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

plugin-cache for fourseven:scss gets insanely huge #302

Open
1 of 3 tasks
derwaldgeist opened this issue Feb 2, 2021 · 3 comments
Open
1 of 3 tasks

plugin-cache for fourseven:scss gets insanely huge #302

derwaldgeist opened this issue Feb 2, 2021 · 3 comments

Comments

@derwaldgeist
Copy link

  • Feature request
  • Bug report
  • Question

meteor version: 1.10.2

fourseven:scss version: 4.12.0

I was wondering why my .meteor folder was so huge (over 6 GB). I found out that 3 GB alone are allocated by plugin-cache/fourseven_scss. What is the reason for this cache size? And is there any way to get this down regularly?

Another 1.8 GB are used by bundler-cache. Not sure where this comes from.

@brettg2
Copy link

brettg2 commented Feb 14, 2021

+++++++++++++++++++++++++++++++++1

Cache folder was last reported at 26 gigs!!

@copleykj
Copy link
Member

copleykj commented Mar 8, 2021

From looking at how caching works, it seems that the caching-compiler package uses the lru-cache package. From the documentation of that package it looks like the cache never gets pruned in normal operation unless you set the max_age option when instantiating the cache and then try to access a cache key that is older than that age. Currently the caching compiler package doesn't set a max age, and even if it did, it sets the key to a hash of the compilation result and therefore it would only prune if you hadn't made changes to your sass files and the last time it was compiled was longer than the `max_age.

I think that the solution might lie in a PR on meteor core repo to add a max_age option and manually calling cache.prune() on the cache if it grows beyond a certain number of objects.

@derwaldgeist
Copy link
Author

Thanks for looking into this, highly appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants