hynek / setup-cached-uv

Use uv in GitHub Actions by adding one line to the workflow.
MIT License
57 stars 2 forks source link

Make workflow and jobs names part of the cache key #10

Closed hynek closed 3 months ago

hynek commented 3 months ago

hm @henryiii would you agree that it would be better if GitHub.job were part of the default suffix? That's ultimately what 99.999% of people want and 90% of them will forget to do the right thing, so maybe we should?

hynek commented 3 months ago

Or to rephrase: how important is it to share caches between jobs?

I feel like if it's that important, we should rather add an absolute cache-key input to let people completely override it.

henryiii commented 3 months ago

Yes, I think this makes sense.

hynek commented 3 months ago

jftr, I've also added a weekly cache in #11 bust and bumped major so nobody can complain. the cache bust can be easily disabled tho

henryiii commented 3 months ago

I thought it already has an timeout of a week built in? Oh, I guess the difference is that the built-in one will evict the cache if it hasn’t been touched in a week, while this will evict every week?

hynek commented 3 months ago

yep exactly! the built-in one doesn't expire if you access it every 5.5 days