How can I make restore_cache job "fail" if it encounters "No cache is found for key:"?

If the job objectively fails, it still reports as passing (with a green tick).

Is there a way to make restore_cache “exit 1”?


A cache in CircleCI does not last forever by default, cache storage duration is set to 15 days so once every 15 days the cache will expire which means a new cache will need to be created. If you set an exit 1 against that restore it would stop you from being able to complete a build until the cache is created once more.

Would it be possible to tell us the reason for this request I will be happy to investigate this further for you if it is required.

Kind Regards
Owen Oliver