circleCI still running the command even though it restores the cache

I’m trying to use the cache functionality in circleCI.
We have config.yaml in the repository. The circleCI is still trying to install ruby gems even though it restores cache. Below are the steps that I have in config.yaml

- restore_cache:
     keys:
            - bundle-install-cache-{{ checksum "docs/Gemfile.lock" }}
- run: bundle install --gemfile=docs/Gemfile
- save_cache:
     key: bundle-install-cache-{{ checksum "docs/Gemfile.lock" }}
     paths:
            - ~/.bundle

I tried to re-run the job. Every time it says found the cache and restores it. And then again runs the bundle install step and takes much time and installs gems. I believe that should be quick as we already restored the cache. But it’s taking like 3 minutes for me. When I looked at the job, it says installing the gems. Not like requirement already satisfied.

And then it skips the save_cache as the key is not changed.

This can be closed. Issue is resolved now. I was using wrong paths to save the cache.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.