question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can I purge old and outdated cache files?

See original GitHub issue

Feature request

On out CI system we upload webpack’s cache to a storage after each build and download them on the next build to speed up build.

After about 6 months, we find there is a 800MB cache directory with more than 100 .pack files in this cache, causing slower and slower download time.

What is the expected behavior?

We’d like to see an API to purge outdated cache content from these files, we can then run purge monthly, a slow purge process is acceptable since this runs only once per month.

What is motivation or use case for adding/changing the behavior?

Try to limit cache size in long term.

How should this be implemented in your opinion?

Maybe we should have a {purge: true} in cache configuration

Are you willing to work on this yourself?

Not able to do that

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:3
  • Comments:18 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
sokracommented, May 2, 2021

Perhaps we can include cache outdated information in output stats

You can set infrastructureLogging: { level: "verbose" } to get a few more lines of logging about the caching.

On short term we want to fix the cache issue by removing all unused files from the cache directory after writing the cache. That sounds easy but actually it a bit tricky since, due to lazy deserialization of the cache, we don’t know all files that are currently in use. We might change the cache format a little bit to know these details.

2reactions
Gavin-Gongcommented, Nov 16, 2022

Is there any progress on this issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Clear Cache vs. Purge Expired Cache in Joomla 2.5
If you purge expired cache, Joomla 2.5 will only delete cache files older than the specified time, which in our example is 30...
Read more >
How to clear cache on Mac? Here's our guide - MacPaw
Generally, it is absolutely safe to remove cache because the apps you install or browsers you use will create new cache files when...
Read more >
Deleting Cache Files - Ask Tim Grey
In this case you probably only need to delete the older cache, but if you delete both a new cache folder will be...
Read more >
Shield Your Internet History: How to Clear Your Cache on Any ...
Go to the three-dot menu at the upper right of Chrome to select More tools > Clear browsing data. This will open a...
Read more >
Is it safe to delete everthing in Caches … - Apple Community
*Hello there. As the topic name says, is it safe to delete everything in the caches folder?* *The reason why I want to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found