Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support automatic deletion of obsolete cache directories #84

Closed
kadamwhite opened this issue Jan 5, 2017 · 0 comments
Closed

Support automatic deletion of obsolete cache directories #84

kadamwhite opened this issue Jan 5, 2017 · 0 comments

Comments

@kadamwhite
Copy link
Collaborator

On a medium-sized project with several bundled assets, the hard sorce cache directory for each configuration hash ends up being around 50mb. This isn't a lot on its own, but after a couple weeks of rapid iteration the overall disk footprint for the parent cache directory ballooned to almost a gig.

This may be out of scope for the plugin, and cleanup steps may certainly be enacted outside of webpack, but I wanted to suggest that it could be helpful to be able to pass a isCacheStale method to the plugin, which could be passed information about the cache file such as how recently a particular cache folder was used or how many have been created since, and return a boolean to be used to remove the cache. That would let us choose whether we want to remove caches after a week, or only keep the latest 3, or some other metric specific to a given project.

@mzgoddard mzgoddard added the soon label May 21, 2018
@mzgoddard mzgoddard added this to the 0.8 milestone May 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants