diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f53392591e5551758311cef76ed981e15f8d3c30..bae7ac646d19e14a81f34e411e3f3ab2337960ff 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,5 +1,15 @@
 image: jhipster/jhipster:v7.6.0
 
+cache:
+  - key: '$CI_COMMIT_REF_NAME'
+    paths:
+      - .maven/
+  - key:
+      files:
+        - package-lock.json
+    paths:
+      - node_modules/
+
 stages:
   - setup
   - lint
@@ -18,21 +28,12 @@ npm-install:
   stage: setup
   script:
     - npm install
-  cache:
-    key: '$CI_COMMIT_SHA'
-    paths:
-      - node_modules/
-    policy: pull-push
 
 checkstyle:
   stage: lint
   script:
     - ./mvnw -ntp checkstyle:check -Dmaven.repo.local=$MAVEN_USER_HOME
   needs: []
-  cache:
-    - key: '$CI_COMMIT_REF_NAME'
-      paths:
-        - .maven/
 
 prettier:
   stage: lint
@@ -40,11 +41,6 @@ prettier:
     - npm run prettier:check
   allow_failure: true
   needs: [npm-install]
-  cache:
-    key: '$CI_COMMIT_SHA'
-    paths:
-      - node_modules/
-    policy: pull
 
 eslint:
   stage: lint
@@ -54,11 +50,6 @@ eslint:
     - "! grep -qE '✖ [0-9]+ problem' lint.log"
   allow_failure: true
   needs: [npm-install]
-  cache:
-    key: '$CI_COMMIT_SHA'
-    paths:
-      - node_modules/
-    policy: pull
 
 maven-compile:
   stage: build
@@ -70,10 +61,6 @@ maven-compile:
       - target/generated-sources/
     expire_in: 1 day
   needs: []
-  cache:
-    - key: '$CI_COMMIT_REF_NAME'
-      paths:
-        - .maven/
 
 maven-test:
   # DinD service is required for Testcontainers
@@ -100,15 +87,10 @@ maven-test:
     expire_in: 30 day
   allow_failure: true
   needs: []
-  cache:
-    - key: '$CI_COMMIT_REF_NAME'
-      paths:
-        - .maven/
 
 frontend-test:
   stage: test
   script:
-    - ls node_modules
     - npm test
   artifacts:
     reports:
@@ -120,11 +102,6 @@ frontend-test:
     expire_in: 1 day
   allow_failure: true
   needs: [npm-install]
-  cache:
-    key: '$CI_COMMIT_SHA'
-    paths:
-      - node_modules/
-    policy: pull
 
 sonar-analyze:
   stage: analyze
@@ -135,10 +112,6 @@ sonar-analyze:
     - ./mvnw -ntp org.jacoco:jacoco-maven-plugin:prepare-agent initialize sonar:sonar -Dsonar.organization=codeAbility -Dsonar.host.url=https://qe-sonarqube.uibk.ac.at/ -Dsonar.login=${SONAR_TOKEN_QE} -Dmaven.repo.local=$MAVEN_USER_HOME
     - ./mvnw -ntp org.jacoco:jacoco-maven-plugin:prepare-agent initialize sonar:sonar -Dsonar.organization=codeAbility -Dsonar.host.url=https://server.arctis.at/sonar/ -Dsonar.login=${SONAR_TOKEN} -Dmaven.repo.local=$MAVEN_USER_HOME
   allow_failure: true
-  cache:
-    - key: '$CI_COMMIT_REF_NAME'
-      paths:
-        - .maven/
 
 maven-package:
   stage: package
@@ -160,7 +133,3 @@ maven-package:
   #    script:
   #        - ./mvnw -ntp jib:build -Pprod -Djib.to.image=$IMAGE_TAG -Djib.to.auth.username=gitlab-ci-token  -Djib.to.auth.password=$CI_BUILD_TOKEN -Dmaven.repo.local=$MAVEN_USER_HOME
   when: manual
-  cache:
-    - key: '$CI_COMMIT_REF_NAME'
-      paths:
-        - .maven/