Caching is a good strategy for optimizing jobs on CircleCI as it enables the reusing of the data from expensive fetch operations from previous jobs.
However, cache hits are not guaranteed; caches created via the save_cache step are only stored for up to 15 days.
Hence if you're writing your jobs in a way that they fail or do the wrong thing when there's a cache miss, consider improving them to be resilient to a cache miss.
Solutions:
-
Make sure that a job that makes use of cached dependencies should be written such that it would be able to do a fresh fetch of the required dependencies upon a cache miss
Your jobs should not fail due to dependency changes or when caches expire.
Comments
Article is closed for comments.