Documentation for caching package folders
The current examples for caching package folders (e.g., npm and nuget) are written in a way that they will cause gradually-increasing cache entry sizes.
Could a note be added to the docs mentioning this? Maybe with a recommended workaround?
This issue is stale because it has been open for 365 days with no activity. Leave a comment to avoid closing this issue in 5 days.
I believe this is still an issue.
Hi @StephenCleary - Could you help me understand the problem? How is the size gradually-increasing?
It's because of the restore-keys usage. Consider the nuget example.
If packages.lock.json contains package A, version X, then the first time this is run, there is no cache hit and nothing is restored to the nuget folder. At the end of the run, a cache is created with package A, version X.
Later, package A is upgraded to version Y, with a corresponding change to packages.lock.json. In this case, there is no cache hit but the nuget folder does get package A version X anyway. At the end of the run, an updated cache is created with package A, version X and package A, version Y. Over time (as your package versions change), your cache size grows.
I don't remember what the workaround was. That was years ago now.
This issue is stale because it has been open for 200 days with no activity. Leave a comment to avoid closing this issue in 5 days.
This issue was closed because it has been inactive for 5 days since being marked as stale.