Many times our cache like .m2(java) node_modules(node) /go/pkg/mod/cache(go) are dynamic in increase, But current cache key just be stable can’t refresh.
And i saw the setting of another cache-key by date, that may no sutable in some situations, can we add a attributes to
cache_restore, to let it can be refresh when it’s already exist.
@huapox having a cache key that changes when some dependency changes are up to you and your language.
I’m quite sure that this isn’t an issue with go since go modules are made to provide reproducible builds so if the go.mod (or go.sum) file is the same than also the dependencies will be the same. Probably this isn’t the case with other languages.
If your language doesn’t provide a way to do this like in your case (I suppose since you haven’t provided enough infos) due to snapshots or transitive dependencies the cache will work anyway and you’ll download only updated depencencies so I don’t see it as an issue and it’s not an agola issue.