Better cache busting when using dependency-versions: 'highest'
#234
Labels
enhancement
New feature or request
dependency-versions: 'highest'
#234
Better cache busting when using
highest
dependency versionsUsing
dependency-versions: 'highest'
is the equivalent to runningcomposer update
, ensuring the latest versions of these dependencies are always used.When it comes to cache keys, the key is unaware of when updates are available since the
composer.(json|lock)
files (hashed and used as part of the cache key) are not always updated to reflect these changes (the benefit of using highest is you don't have to).Background/problem
If a project goes a long time without updating their
composer.(json|lock)
files, it's possible that the cache restored could become really outdated This reduces the benefit of the cache sinceupdate
will need to pull new versions every workflow run.Proposal/solution
One way to fix this could be to include a date in the cache key when using
highest
. In WordPress/wordpress-develop, we chose to use the date for the previous Monday to ensure the cache was refreshed at least once a week.The text was updated successfully, but these errors were encountered: