| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| * `cache-hit` - A string `'true'` or `'false'` indicating whether an exact match was found for the key. | ||
|
|
||
| > **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`. | ||
| > **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'`. |
There was a problem hiding this comment.
This is still incorrect. On a cache miss, the output is not set, i.e. empty string.
Sorry, something went wrong.
There was a problem hiding this comment.
@itchyny So you are saying it is three-valued, 'true', 'false' or empty?
Sorry, something went wrong.
There was a problem hiding this comment.
@andreasabel Exactly. A bit surprising behavior though. See https://github.com/itchyny/actions-cache-issues-1263/actions/runs/8385497449.
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks for the thorough investigation @itchyny ! I updated the text accordingly.
Sorry, something went wrong.
Rationale: if `cache-hit` was a boolean, then `!` could be used to get the opposite. However, it is really a string, and this should be pointed out clearly in the documentation. Because both `!'true'` and `!'false'` are `false`, so customers can shoot themselves in the foot here. Closes actions#1262.
|
👋 Hey @andreasabel thank you for these changes! I'm updating the README to reflect this behavior as part of a bug fix in #1467 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Rationale: if cache-hit was a boolean, then ! could be used to get the opposite.
However, it is really a string, and this should be pointed out clearly in the documentation.
Because both !'true' and !'false' are false, so customers can shoot themselves in the foot here.
Closes #1262.