You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It turns out that while caching the cargo files in the workflow, we are using the key: ${{ runner.os }}-cargo to uniquely identify and restore the cache.
This has cache invalidation issues, as it doesn't take into account changes in dependencies. To solve it we can introduce the hash of Cargo.lock to uniquely identify the cache based on the lockfile.
Here's a better alternative: key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
The text was updated successfully, but these errors were encountered:
It turns out that while caching the cargo files in the workflow, we are using the
key: ${{ runner.os }}-cargo
to uniquely identify and restore the cache.This has cache invalidation issues, as it doesn't take into account changes in dependencies. To solve it we can introduce the hash of
Cargo.lock
to uniquely identify the cache based on the lockfile.Here's a better alternative:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
The text was updated successfully, but these errors were encountered: