mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #434] [MERGED] perf: TTL-based eviction sweep for prefetch cache #572
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#572
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/434
Author: @Divkix
Created: 3/11/2026
Status: ✅ Merged
Merged: 3/11/2026
Merged by: @james-elicx
Base:
main← Head:worktree-perf/prefetch-cache-ttl-sweep📝 Commits (4)
2d4bf89perf: add TTL-based eviction sweep for prefetch cache968f133fix: sync prefetched URL set on cache eviction32baeecMerge remote-tracking branch 'origin/main' into worktree-perf/prefetch-cache-ttl-sweep59b4064fix: address review comments on prefetch cache TTL sweep📊 Changes
3 files changed (+175 additions, -4 deletions)
View changed files
📝
packages/vinext/src/shims/navigation.ts(+21 -4)📝
packages/vinext/src/shims/next-shims.d.ts(+1 -0)➕
tests/prefetch-cache.test.ts(+153 -0)📄 Description
Closes #440
Summary
storePrefetchResponse()that clears all expired entries before falling back to FIFO eviction, preventing expired entries from wasting cache slots on link-heavy pagesMAX_PREFETCH_CACHE_SIZEfromnavigation.tsfor testabilityTest plan
pnpm test tests/prefetch-cache.test.ts— 4/4 passpnpm test tests/shims.test.ts— 652/652 pass (no regressions)pnpm run typecheck— cleanpnpm run lint— cleanpnpm run fmt:check— clean🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.