diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 67789a2a73504ac5c83f1af55082eea272a9c360..d5f1930dd315020d8379462db0d01cebd1749407 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -22,7 +22,7 @@ variables:
   image: registry.c4science.ch/scitas-stack/rhel:9.3
   parallel:
     matrix:
-      - environment: [jed]
+      - environmennnt: [jed]
         slurm_options: ["-c 72 -p jed -q jed"]
         stack: ["pinot-noir"]
       # - environment: [izar]
@@ -50,7 +50,7 @@ variables:
 
 .spack_cache:
   cache:
-    key: ${environment}-spack-cache
+    key: ${stack}-${environment}-spack-cache
     policy: pull-push
     paths:
       - ${stack}
@@ -75,7 +75,7 @@ spack:setup:
   script:
     - ci/setup_spack.sh
   needs:
-    - job: spack:checkout
+    - job: "spack:checkout: [$environment, $slurm_options, $stack]"
   artifacts:
     paths:
       - ${stack}/environment
@@ -99,7 +99,7 @@ spack:install_compilers:
     reports:
       junit: spack-install-*.xml
   needs:
-    - job: spack:setup
+    - job: "spack:setup: [$environment, $slurm_options, $stack]"
   timeout: 5h
 
 spack:concretize:
@@ -112,7 +112,7 @@ spack:concretize:
     - ${STACK_LOCATION}/spack/bin/spack -e ${SPACK_SYSTEM_CONFIG_PATH} config blame
     - ${STACK_LOCATION}/spack/bin/spack -e ${SPACK_SYSTEM_CONFIG_PATH} concretize
   needs:
-    - job: spack:install_compilers
+    - job: "spack:install_compilers: [$environment, $slurm_options, $stack]"
   artifacts:
     paths:
       - ${stack}/environment
@@ -140,7 +140,7 @@ spack:install:
         echo "{}" > spack-install.xml
       fi
   needs:
-    - job: spack:concretize
+    - job: "spack:concretize: [$environment, $slurm_options, $stack]"
   artifacts:
     paths:
       - ${stack}/environment
@@ -157,5 +157,5 @@ spack:mksquashfs:
     - "mksquashfs ${CI_PROJECT_DIR} stack-${stack}-${environment}-${CI_COMMIT_REF_SLUG}.sqfs"
     - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file stack-${stack}-${environment}-${CI_COMMIT_REF_SLUG}.sqfs "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/stack/${stack}/stack-${stack}-${environment}-${CI_COMMIT_REF_SLUG}.sqfs"'
   needs:
-    - job: spack:install
+    - job: "spack:install: [$environment, $slurm_options, $stack]"
   timeout: 10h