Cache not working

I have the following gitlab ci yaml file:

image: steveedson/ci

stages:
  - build

cache:
  untracked: true
  key: "$CI_PROJECT_ID"
  paths:
    - node_modules/
    - _site/vendor/
    - .bundled/
    - .yarn

build:
  stage: build
  script:
    - ls -l
    - yarn config set cache-folder .yarn
    - yarn install
    - ...

When my successful builds finish, they show:

Creating cache 1970478...
Created cache

And when the next commit triggers a build, I get:

Checking cache for 1970478...
Successfully extracted cache

But the ls -l in my first step doesn’t show the cached directories. I’ve tried caching the cache key but this doesn’t help.

This is running on gitlab.com, not a private server.

I’m getting the same. Did you fix this?

I’m experiencing the exact same problem. The output does tell me it’s extracting the cache, and also creating the cache at the end, however, it’s empty when I do an ls. Has anyone else come across this issue on Gitlab CI (hosted by gitlab.com) and/or found a solution?

Edit: I have reported this to Gitlab support for further investigation.

I’m seeing the same here on Gitlab’s shared workers.

Any updates on this? I have an even simpler ci.yaml file that doesn’t store the cache but also shows all the messages.

Have you got any reply from them? Still same issue here

Same problem here.

Can you give us your issue-link so we can upvote it?

Exactly same issue. Version 9.2.5.

Did anyone manage to get resolution of this issue?

Are you sure you describe an intended behaviour?

See the help:

cache is used to specify a list of files and directories which should be cached between jobs.

As I understand it is not intended to cache files between builds (pipelines in terms of GitLab). It looks some strange to me to cache files between builds.

Upd. I’m sorry, futher in the help

By default caching is enabled and shared between pipelines and jobs, starting from GitLab 9.0