actions / cache

Cache dependencies and build outputs in GitHub Actions
MIT License
4.36k stars 1.16k forks source link

cache/restore fails to hit if same paths given in different order #1426

Open mosteo opened 6 days ago

mosteo commented 6 days ago

As can be seen in this run, restore will hit or miss depending on the order of the paths given.

Not seen on that workflow, but if you use actions/cache/save, it will complain that the cache already exists despite a restore having reported a missed cache, if both use different orders.

Not a good practice on the user side to use different orders, but I guess that the actions could do some sorting to avoid this kind of pitfall.