Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,12 @@ If you are using a `self-hosted` Windows runner, `GNU tar` and `zstd` are requir

### Outputs

* `cache-hit` - A boolean value to indicate 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

Expand Down
9 changes: 5 additions & 4 deletions restore/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ The restore action restores a cache. It works similarly to the `cache` action ex

### Outputs

* `cache-hit` - A boolean value to indicate 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.
In this case, `cache-primary-key == cache-matched-key`.
2. `'false'` if a cache matching one of the `restore-keys` was found.
3. Empty if no matching cache was found (cache miss).
* `cache-primary-key` - Cache primary key passed in the input to use in subsequent steps of the workflow.
* `cache-matched-key` - Key of the cache that was restored, it could either be the primary key on cache-hit or a partial/complete match of one of the restore keys.

> **Note**
`cache-hit` will be set to `true` only when 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`.

### Environment Variables

* `SEGMENT_DOWNLOAD_TIMEOUT_MINS` - Segment download timeout (in minutes, default `10`) to abort download of the segment if not completed in the defined number of minutes. [Read more](https://github.com/actions/cache/blob/main/tips-and-workarounds.md#cache-segment-restore-timeout)
Expand Down