# CircleCI cache issue in Sep 4 outage

**URL:** <https://discuss.circleci.com/t/circleci-cache-issue-in-sep-4-outage/24897>\
**Category:** Bug Reports\
**Created:** [September 4, 2018, 6:30pm UTC](https://discuss.circleci.com/t/circleci-cache-issue-in-sep-4-outage/24897 "2018-09-04T18:30:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shaobos](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@shaobos](https://discuss.circleci.com/u/shaobos)\
**Post date:** [September 4, 2018, 6:30pm UTC](https://discuss.circleci.com/t/circleci-cache-issue-in-sep-4-outage/24897/1 "2018-09-04T18:30:45Z")

</div>

![32%20AM](https://global.discourse-cdn.com/circleci/original/3X/4/1/4105672a2fa77a1531352a9ebdeb8ced424e9978.png)

Hi,

We’re seeing cache issues across all our builds in today’s outage. All saving cache went through but restoring cache shows that “No cache is found for key…”. From the text of the banner, it’s unclear why cache is affected.

Here is what banner looks like today:

> #### Partially Degraded Service - components affected: CircleCI UI, Google Cloud Platform Google Cloud Storage
> 
> Updated 25 min ago - Increased Bitbucket Permission Errors: We are continuing to work on a fix for this issue. We will provide an update in 20 minutes.

We have CI workflow depend on the restored cache so we wonder if cache is not something we can safely rely upon.

---

<div class="post-metadata">

**Author:** ![halfer](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/halfer/32/9083_2.png) [@halfer](https://discuss.circleci.com/u/halfer)\
**Post date:** [September 4, 2018, 7:36pm UTC](https://discuss.circleci.com/t/circleci-cache-issue-in-sep-4-outage/24897/2 "2018-09-04T19:36:58Z")

</div>

> [@shaobos](#):
>
> We have CI workflow depend on the restored cache

How are you using the cache? Is this a device to preserve files in jobs across a workflow? If so, I wonder if you should be using workspaces anyway, since that is designed for the purpose.

---

<div class="post-metadata">

**Author:** ![FelicianoTech](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/felicianotech/32/21348_2.png) [@FelicianoTech](https://discuss.circleci.com/u/FelicianoTech)\
**Post date:** [September 5, 2018, 5:44pm UTC](https://discuss.circleci.com/t/circleci-cache-issue-in-sep-4-outage/24897/3 "2018-09-05T17:44:12Z")

</div>

A missing cache should not fail your build. If it does, I would rework that to utilize Workspaces, artifacts, etc. The specific solution depends on what you’re doing.

That being said, cache shouldn’t be missing suddenly like this for all builds. Is this issue still happening? How are you generating the cache key?

---

<div class="post-metadata">

**Author:** ![shaobos](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@shaobos](https://discuss.circleci.com/u/shaobos)\
**Post date:** [September 5, 2018, 6:28pm UTC](https://discuss.circleci.com/t/circleci-cache-issue-in-sep-4-outage/24897/4 "2018-09-05T18:28:36Z")

</div>

Hi thanks for both of your prompt responses. Workspace definitely sounds like a better solution to our use case. On second thought, I’m not even sure the way we’re using any of these is necessary. let me share more details and your suggestions are very welcomed.

The use case is that we have a workflow that runs against a feature branch used for pull request. We define a “setup” job required by subsequent jobs like “test” and “lint”. In “setup”, we set the HEAD to a merged commit (merge from this branch and the master). The revision of the HEAD is cached and later restored in “test” and “lint”, followed by git reset to this exact revision. The idea is to ensure all jobs in a workflow work against the exact same code. Now I wonder if what we implement here is really needed. Perhaps CircleCI already has some mechanism to achieve this.

(11:40am I made some updates to the description)

---

<div class="post-metadata">

**Author:** ![halfer](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/halfer/32/9083_2.png) [@halfer](https://discuss.circleci.com/u/halfer)\
**Post date:** [September 5, 2018, 7:32pm UTC](https://discuss.circleci.com/t/circleci-cache-issue-in-sep-4-outage/24897/5 "2018-09-05T19:32:48Z")

</div>

> [@shaobos](#):
>
> The revision of the HEAD is cached and later restored in “test” and “lint”, followed by git reset to this exact revision. The idea is to ensure all jobs in a workflow work against the exact same code.

Would you post the sequence of `git` commands you are using? A basic `checkout` will do a clone in exactly the same way for all jobs in a workflow, so I am not sure what the `reset` additionally achieves.

And, while there is no harm in doing a checkout in all of your jobs, if you also have dependencies or other source build tasks, a workflow does sound like a good solution (it may be faster to restore a directory than do a fresh checkout+build for every job). Have a look at the Workflows section in the manual to see how this works.
