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

Cache Garbage Collection #9004

Draft
wants to merge 5 commits into
base: v2
Choose a base branch
from
Draft

Cache Garbage Collection #9004

wants to merge 5 commits into from

Conversation

mischnic
Copy link
Member

@mischnic mischnic commented May 10, 2023

  1. Store all cache keys related to Transformation and packaging in the request graph
  2. Walk the request graph/bundleInfo list to figure out all "used" cache entries
  3. Traverse all existing cache entries and remove all unused entries

The big question: how often should it run. Right now it:

  • runs after one-shot build if the last GC was >=24 hours ago
  • runs if watch mode if the last build was >=5 minutes ago, and the last GC ran >=4 hours ago. (If the GC takes too long and a build is requested in the meantime, it should abort the GC.)
  • Manually (forcibly) via Ctrl-G in watch mode

Any thoughts on:

  • this approach in general (build vs watch mode, waiting for idle)?
  • the specific durations?

Problems this causes:

  • with parcel serve && parcel build, the prod build could remove all cache entries from dev mode (or if there are multiple Parcel invocations with differing entrypoints)

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

Successfully merging this pull request may close these issues.

None yet

1 participant