Skip to content

fix(data): let blobStore's disk cache grow unbounded - #189

Open
krisnye wants to merge 1 commit into
mainfrom
krisnye/blob-ref-eviction
Open

fix(data): let blobStore's disk cache grow unbounded#189
krisnye wants to merge 1 commit into
mainfrom
krisnye/blob-ref-eviction

Conversation

@krisnye

@krisnye krisnye commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Drops the manual FIFO cap on blobStore's storage tier (was maximumStorageEntries: 1000), so the disk cache relies on the browser's own Cache Storage eviction instead of periodically scanning/sorting every key in the bucket.
  • maximumStorageEntries is now optional on getManagedPersistentCache/getDeferredManagedPersistentCache; when omitted the storage tier skips the FIFO-trim wrapper entirely and uses the raw persistent cache.
  • datacache (used by data-cache.ts) keeps its existing 1000-entry cap unchanged, since it has no remote-URL fallback for evicted entries the way blobStore's combined refs do.

Test plan

  • pnpm run lint
  • pnpm run typecheck (clean, tsbuildinfo caches cleared first)
  • pnpm test in packages/data — full suite (275 files / 3229 tests) passes, including blob-store.browser.test.ts and managed-async-cache.browser.test.ts

…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>
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.

1 participant