You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+34-3
Original file line number
Diff line number
Diff line change
@@ -25,10 +25,10 @@ Create a workflow `.yml` file in your repositories `.github/workflows` directory
25
25
26
26
> See [Skipping steps based on cache-hit](#Skipping-steps-based-on-cache-hit) for info on using this output
27
27
28
-
### Branch scope
28
+
### Cache scopes
29
29
The cache is scoped to the key and branch. The default branch cache is available to other branches.
30
30
31
-
See https://help.github.com/en/actions/configuring-and-managing-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key for more info.
31
+
See [Matching a cache key](https://help.github.com/en/actions/configuring-and-managing-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key) for more info.
32
32
33
33
### Example workflow
34
34
@@ -86,6 +86,37 @@ See [Examples](examples.md) for a list of `actions/cache` implementations for us
- [Swift - Swift Package Manager](./examples.md#swift---swift-package-manager)
88
88
89
+
## Creating a cache key
90
+
91
+
A cache key can include any of the contexts, functions, literals, and operators supported by GitHub Actions.
92
+
93
+
For example, using the [`hashFiles`](https://help.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#hashfiles) function allows you to create a new cache when dependencies change.
See [Using contexts to create cache keys](https://help.github.com/en/actions/configuring-and-managing-workflows/caching-dependencies-to-speed-up-workflows#using-contexts-to-create-cache-keys)
119
+
89
120
## Cache Limits
90
121
91
122
A repository can have up to 5GB of caches. Once the 5GB limit is reached, older caches will be evicted based on when the cache was last accessed. Caches that are not accessed within the last week will also be evicted.
@@ -113,7 +144,7 @@ steps:
113
144
> Note: The `id` defined in `actions/cache` must match the `id` in the `if` statement (i.e. `steps.[ID].outputs.cache-hit`)
114
145
115
146
## Contributing
116
-
We would love for you to contribute to `@actions/cache`, pull requests are welcome! Please see the [CONTRIBUTING.md](CONTRIBUTING.md) for more information.
147
+
We would love for you to contribute to `actions/cache`, pull requests are welcome! Please see the [CONTRIBUTING.md](CONTRIBUTING.md) for more information.
117
148
118
149
## License
119
150
The scripts and documentation in this project are released under the [MIT License](LICENSE)
0 commit comments