Skip to content

Commit d4219d1

Browse files
authored
Add FAQ on changed cache and cache upload behavior (#477)
Closes: #467
1 parent aaefb91 commit d4219d1

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,23 @@ Running `actions/checkout` after `setup-uv` **is not supported**.
542542
No, `setup-uv` alone wont install any libraries from your `pyproject.toml` or `requirements.txt`, it only sets up `uv`.
543543
You should run `uv sync` or `uv pip install .` separately, or use `uv run ...` to ensure necessary dependencies are installed.
544544

545+
### Why is a changed cache not detected and not the full cache uploaded?
546+
547+
When `setup-uv` starts it has to know whether it is better to download an existing cache
548+
or start fresh and download every dependency again.
549+
It does this by using a combination of hashes calculated on the contents of e.g. `uv.lock`.
550+
551+
By calculating these hashes and combining them in a key `setup-uv` can check
552+
if an uploaded cache exists for this key.
553+
If yes (e.g. contents of `uv.lock` did not change since last run) the dependencies in the cache
554+
are up to date and the cache will be downloaded and used.
555+
556+
Details on determining which files will lead to different caches can be read under
557+
[cache-dependency-glob](#cache-dependency-glob)
558+
559+
Some dependencies will never be uploaded to the cache and will be downloaded again on each run
560+
as described in [disable-cache-pruning](#disable-cache-pruning)
561+
545562
## Acknowledgements
546563

547564
`setup-uv` was initially written and published by [Kevin Stillhammer](https://github.com/eifinger)

0 commit comments

Comments
 (0)