cache icon indicating copy to clipboard operation
cache copied to clipboard

DX: improve "Cache hit occurred on the primary key 8.0.22-phpstan-result, not saving cache."

Open clxmstaab opened this issue 3 years ago • 2 comments

I am using this action and after some debugging found out that I got trapped into a "caches are immutable" problem and I need to apply the Update a Cache workaround. I also found out, that this is a problem a lot of people have / run into, as the issue tracker suggests.

In case you know a cache is immutable and will not be updated, its pretty obvious how a fix looks like.

but if you don't know caches are immutable debugging the reason and finally finding the workaround costs a lot of time.

I think if

"Cache hit occurred on the primary key 8.0.22-phpstan-result, not saving cache."

would e.g. read like

"Cache hit occurred on the primary key 8.0.22-phpstan-result, not saving cache." "Note: Caches are immutable. See https://github.com/actions/cache/blob/main/workarounds.md#update-a-cache

the fix and the actual problem would be pretty obvious and less time lost.

clxmstaab avatar Sep 09 '22 08:09 clxmstaab

Hi @clxmstaab, thanks for your feedback. So if I understood it right, your suggestion is to add a note regarding cache immutability in the actions/cache logs right?

kotewar avatar Sep 12 '22 02:09 kotewar

thx for getting back to me.

regarding cache immutability in the actions/cache logs right?

exactly

clxmstaab avatar Sep 12 '22 07:09 clxmstaab

This issue is stale because it has been open for 200 days with no activity. Leave a comment to avoid closing this issue in 5 days.

github-actions[bot] avatar Apr 03 '23 08:04 github-actions[bot]

This issue was closed because it has been inactive for 5 days since being marked as stale.

github-actions[bot] avatar Apr 09 '23 08:04 github-actions[bot]