diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b71cc2d05cd82d387406bb7ba1342ebea2bcc092..2dee18f0b657894c49a263623a39a014e230c84b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -135,7 +135,9 @@ test:
     # Gitlab CI caching is shit. So we implement it manually
     - |
       # Restore cache
-      if [ -f "${CACHE_ARCHIVE}" ]; then
+      if [ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]; then
+        echo "Skip restoring cache on the master branch"
+      elif [ -f "${CACHE_ARCHIVE}" ]; then
         ci-log-section start "restore-cache" Restoring cache from ${CACHE_ARCHIVE} ...
         tar -xf ${CACHE_ARCHIVE}
         echo "Ok"