Closed ohaval closed 5 months ago
I managed to fix the issue by settings the path
argument in the cache/save@v3
action to ci/cache/docker
.
So it seems like before, when I attempted to retrieve the cache I used the directory as the value, and when I stored the cache I used a file reference. And because of that, the cache failed to be retrieved on the next execution.
@ohaval, there's an issue with path
closed by https://github.com/actions/toolkit/pull/1378. There's a workaround https://github.com/actions/toolkit/pull/1378#issuecomment-1478388929 that can be applied in your fork of actions/cache
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.
This issue was closed because it has been inactive for 5 days since being marked as stale.
Hey,
I am using the
actions/cache/restore@v3
action as part of my own action. I am storing the cache items with a specific pattern, which doesn't allow me to get cache hits, so I'm counting onrestore-keys
to get me the last cached item based on a prefix search.As the (docs)[https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key] say: "If there are multiple partial matches for a restore key, the action returns the most recently created cache."
With that being said, I am experiencing an issue when I receive a non-most recently create cache for a specific prefix. Is there any known problem with it? Is there any specific way needed to make it work?
Currently, my experiments are in a private organization, but if needed I can reproduce it in a test public repository.
This is my usage of the action inside the YML file:
And this is how I store a new item in the cache storage:
Thanks