diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4397eec1ccb26dc7a6d1bca0fd9cc77d6412fc49..d4e0db8c8cd78a72a079192374d1860f2c05c248 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -71,7 +71,7 @@ documentation:pdf:
   - mdbook build ./documentation/ --dest-dir public
   cache:
     paths:
-    - target
+    - /root/.cargo/bin/mdbook
 
 documentation:static:
   rules:
@@ -85,9 +85,6 @@ documentation:static:
 documentation:test:
   rules:
     - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
-  cache:
-    paths:
-    - target
   <<: *rust
 
 sast: