Comments (3)
I'll use GitHub's cache action as an example. Read up on the feature here.
You do this:
restore-keys: |
npm-feature-${{ hashFiles('package-lock.json') }}
npm-feature-
npm-
Which evaluates to (for example):
restore-keys: |
npm-feature-d5ea0750
npm-feature-
npm-
When npm-feature-d5ea0750
cache is found, it will be restored, but since it's the first key, the cache will not be rebuilt. In effect it means the package-lock.json
has not changed and the cache is fine.
When npm-feature-
(which is really npm-feature-*
) is found, then the cache is restored, but it also will be rebuilt. This would be the case when the package-lock.json
file(s) have changed, which means some dependencies have been updated or changed, so then the cache needs to be rebuilt.
from drone-cache.
Still needed 😄
Rebuild cache should only run when the primary restore key is not hit. That way I can calculate restore key based on dependencies and it will change only when dependencies change.
from drone-cache.
@timbze Thanks for letting us know. I'd have to know more about the use case to better understand how to implement this. If anyone wants to volunteer for taking this on let me know, otherwise it will probably fairly low priority on the list of Drone Cache related work for me, personally.
from drone-cache.
Related Issues (20)
- Support passing multiple files to the `checksum` function HOT 3
- Migrate CI tasks to Github Actions HOT 3
- why repeat build in rust? HOT 3
- Allow excluding files from caching HOT 6
- Doublestar support in mount array HOT 2
- Tar archive does not restore file (or directory) modification time stamps HOT 1
- Unable to read from S3 buckets with TLS/SSL required HOT 1
- Fix issues with goreleaser Darwing builds failing
- Move releases from GitHub Actions to Drone CI HOT 4
- Remove liche and embedmd (generate) steps from CI HOT 1
- Can't cache gradle dependencies with message "no such file or directory" HOT 1
- "No matches found for glob" using hashFiles with packages.lock.json HOT 2
- When caching to Azure blobs, the container name is being ignored
- Caching absolute directory
- Glob path matching causes panic
- Cache restore not working for glob paths
- uncaught error, initialize backend <sftp>, initialize backend, unable to get ssh auth method, unknown ssh method (PASSWORD, PUBLIC_KEY_FILE) HOT 1
- Enable Assume Role from Drone Pipeline Step HOT 8
- [Bug] Unable to create really big caches HOT 1
- [Bug] Input Key mismatch for Azure config
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drone-cache.