3
0
Fork 0
mirror of https://code.forgejo.org/actions/cache.git synced 2025-04-24 12:25:32 +00:00

Added save readme

This commit is contained in:
Sankalp Kotewar 2022-12-14 04:35:02 +00:00 committed by GitHub
parent adecab4b4a
commit 9d445b2565
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 92 additions and 2 deletions

View file

@ -115,4 +115,12 @@ steps:
- name: Build
run: /build.sh
```
```
## Tips
Since this action comes with its own set of pros and cons, we are listing some of the ways by which you can tackle the limitations.
### Reusing primary key and restored key in the save action
One of the limitation you might experience is passing the same input in both `actions/cache/restore` and `actions/cache/save` action. To avoid this, you can make use of the `outputs` from the restore action to reuse the same primary key and also the key of the cache that was restored. This way changing any key in the restore action will automatically reflect in the subsequent actions where the same input is being used.