diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index bae7ac646d19e14a81f34e411e3f3ab2337960ff..d008f1893d4274d25bd9dc485d8936332f0696ef 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,11 +4,6 @@ cache:
   - key: '$CI_COMMIT_REF_NAME'
     paths:
       - .maven/
-  - key:
-      files:
-        - package-lock.json
-    paths:
-      - node_modules/
 
 stages:
   - setup
@@ -28,6 +23,13 @@ npm-install:
   stage: setup
   script:
     - npm install
+  cache:
+    key:
+      files:
+        - package-lock.json
+    paths:
+      - node_modules/
+    policy: pull-push
 
 checkstyle:
   stage: lint
@@ -41,6 +43,13 @@ prettier:
     - npm run prettier:check
   allow_failure: true
   needs: [npm-install]
+  cache:
+    key:
+      files:
+        - package-lock.json
+    paths:
+      - node_modules/
+    policy: pull
 
 eslint:
   stage: lint
@@ -50,6 +59,13 @@ eslint:
     - "! grep -qE '✖ [0-9]+ problem' lint.log"
   allow_failure: true
   needs: [npm-install]
+  cache:
+    key:
+      files:
+        - package-lock.json
+    paths:
+      - node_modules/
+    policy: pull
 
 maven-compile:
   stage: build
@@ -102,6 +118,13 @@ frontend-test:
     expire_in: 1 day
   allow_failure: true
   needs: [npm-install]
+  cache:
+    key:
+      files:
+        - package-lock.json
+    paths:
+      - node_modules/
+    policy: pull
 
 sonar-analyze:
   stage: analyze