Open P1119r1m opened 1 month ago
Cache keys are prefix-matched, so if your restore key is cache-toolchains-atf-d64
then both cache-toolchains-atf-d64
and cache-toolchains-atf-d64x
would be a valid cache to restore.
restore-keys - An ordered list of prefix-matched keys to use for restoring stale cache if no cache hit occurred for key.
Cache keys are prefix-matched, so if your restore key is
cache-toolchains-atf-d64
then bothcache-toolchains-atf-d64
andcache-toolchains-atf-d64x
would be a valid cache to restore.restore-keys - An ordered list of prefix-matched keys to use for restoring stale cache if no cache hit occurred for key.
Thank you for clarifying.
UPD. Please note that the original issue was related to the key
input, not the restore-keys
.
Could you please update the documentation to include information about the key
as well, since it currently only details the "prefix-match" behavior for restore-keys
?
The current documentation contains following infomation:
Inputs
key
- An explicit key for a cache entry. See creating a cache key.- ...
restore-keys
- An ordered list of prefix-matched keys to use for restoring stale cache if no cache hit occurred for key.
It would be helpful to provide additional details on how the key
itself functions in relation to cache hits and misses.
👋 I've checked the internal service implementation and it appears that our documentation is incorrect. key
uses prefix-matching similar to how restore-keys
works.
When trying to restore the "cache-toolchains-atf-d64" the Cache action actually restores "cache-toolchains-atf-d64x" (with 'x' at the end):