Skip to content

docs: refine resource cache phase 2 design#122

Merged
mahyarmlk merged 1 commit into
mainfrom
docs/resource-cache-phase-2-design
Jun 27, 2026
Merged

docs: refine resource cache phase 2 design#122
mahyarmlk merged 1 commit into
mainfrom
docs/resource-cache-phase-2-design

Conversation

@mahyarmlk

Copy link
Copy Markdown
Collaborator

Summary

Refines the existing Resource Cache and Stale Semantics proposal with a clear phased implementation plan. Phase 2 is scoped to cache.key only — no cacheTime, SWR, or cross-navigation cache.

Changes

  • Updated status header to reflect Phase 1 implementation + Phase 2 design
  • Added comprehensive Phase Plan section (Phases 1–6+)
  • Added Approved Next Implementation Slice section answering all 10 design questions from the task
  • Added Behavior Specification for Phase 2: type additions, key derivation, entry lifecycle, active key visibility, backward compatibility
  • Added Test Plan with 21 unit test scenarios
  • Added Compatibility Notes covering migration, feature interaction, and deferred open questions
  • Updated Implementation Status table to include Phase 2 decisions

Phase 2 Scope

  • cache.key: (context) => ResourceKey only
  • Scoped to one runtime + one ResourceNode
  • Internal Map<ResourceKey, CacheEntry> storage
  • Per-key deduplication and staleTime
  • No-runtime-code change (docs/proposal only)

Validation

  • pnpm lint
  • pnpm typecheck
  • pnpm build
  • pnpm changeset status ✅ (no changes needed — docs only)

@mahyarmlk mahyarmlk merged commit 91078f1 into main Jun 27, 2026
1 check passed
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