README: clarify that cache-hit is 3-valued, not a boolean

Evidence at https://github.com/itchyny/actions-cache-issues-1263
This commit is contained in:
Andreas Abel 2024-03-22 07:42:50 +01:00
parent 8fc291c114
commit 3182ee571c
2 changed files with 10 additions and 8 deletions

View file

@ -65,11 +65,12 @@ If you are using a `self-hosted` Windows runner, `GNU tar` and `zstd` are requir
### Outputs
* `cache-hit` - A string `'true'` or `'false'` indicating whether an exact match was found for the key.
* `cache-hit` - A string with three possible values indicating whether a matching cache was found:
1. `'true'` if a cache exactly matching `key` was found.
2. `'false'` if a cache matching one of the `restore-keys` was found.
3. Empty if no matching cache was found (cache miss).
> **Note** `cache-hit` will only be set to `'true'` when a cache hit occurs for the exact `key` match. For a partial key match via `restore-keys` or a cache miss, it will be set to `'false'`.
See [Skipping steps based on cache-hit](#skipping-steps-based-on-cache-hit) for info on using this output
See [Skipping steps based on cache-hit](#skipping-steps-based-on-cache-hit) for info on using this output.
### Cache scopes