diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c6a530c73fb40ee5ab323fda2f90570dd145f0f1..083cf97edbea7f39967d2b24e57d260220dea6a2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,7 +4,8 @@ stages:          # List of stages for jobs, and their order of execution
   - deploy
 
 cache: &global_cache
-  key: $CI_COMMIT_REF_SLUG
+  # key: $CI_COMMIT_REF_SLUG
+  key: $CI_COMMIT_SHA
   paths:
     - bin
   policy: pull-push
@@ -16,7 +17,7 @@ build-job:       # This job runs in the build stage, which runs first.
   script:
     - echo "Compiling the code..."
     - echo "Compile complete."
-    - mkdir bin
+    - mkdir -p bin
     - cp /usr/bin/rev bin
 
 unit-test-job:   # This job runs in the test stage.