No Cache Found and Skipping Cache Generation

If you find yourself in a situation where no cache is being found in your restore cache step, and the saving cache step states the cache already exists, double check the checksum. The cache key is generated using the checksum of the file provided in your configuration, often a "lock" file.

If this file is modified in any way between the restore and save steps, you will have mismatching keys, meaning you are attempting to save your cache to one key, and restore from another, which will always fail.

 

Errors:

'No cache is found for key:`

'Skipping cache generation, cache already exists for key:`

Capture1.PNG

Capture.PNG

 

Why does this happen?

Check to see if there is any reason your lock file is being overwritten at any point during the build process, this may happen during an installation step.

 

If you are using Ruby Bundler and have a version mismatch between your local dev environment and the CircleCI environment, the bundle install step will overwrite your Gemfile.lock and cause the issue mentioned above.

 

Always verify parity between your local and remote development environments.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.