fix(data): let blobStore's disk cache grow unbounded - #189
Open
krisnye wants to merge 1 commit into
Open
Conversation
…ser eviction The manual FIFO cap on blobStore's storage tier required periodically scanning and sorting every key in the Cache Storage bucket. Local blob refs already self-heal from remoteBlobRef on eviction, so drop the cap and let the browser's own Cache Storage eviction handle it instead. datacache keeps its cap since it has no remote fallback. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
blobStore's storage tier (wasmaximumStorageEntries: 1000), so the disk cache relies on the browser's own Cache Storage eviction instead of periodically scanning/sorting every key in the bucket.maximumStorageEntriesis now optional ongetManagedPersistentCache/getDeferredManagedPersistentCache; when omitted the storage tier skips the FIFO-trim wrapper entirely and uses the raw persistent cache.datacache(used bydata-cache.ts) keeps its existing 1000-entry cap unchanged, since it has no remote-URL fallback for evicted entries the wayblobStore's combined refs do.Test plan
pnpm run lintpnpm run typecheck(clean, tsbuildinfo caches cleared first)pnpm testinpackages/data— full suite (275 files / 3229 tests) passes, includingblob-store.browser.test.tsandmanaged-async-cache.browser.test.ts