What problem does it solve? Responses in a React Server Components app are re-rendered on every request by default, wasting compute on content that rarely changes, while naive caching risks leaking per-user data into shared entries. This Skill configures segment-level caching with stale-while-revalidate so expensive renders are served from a store while loaders stay fresh per request. ## Core Features & Use Cases - Route and segment caching: Wrap route subtrees in the cache() DSL with TTL and SWR windows, nest boundaries for overrides, and cache individual loader results independently. - Tag-based invalidation: Attach static or dynamic tags to cached entries and evict them from server actions with updateTag or from route handlers with revalidateTag. - Pluggable cache stores: Use MemorySegmentCacheStore for single-instance deployments or CFCacheStore on Cloudflare Workers with optional KV as a cross-colo L2 layer, latency budgets, and fail-safe degradation. - Cache purity guards: Request-scoped APIs like cookies() and headers() throw inside cached handlers, forcing per-request data into loaders consumed via useLoader() in client components. - Use Case: A blog index page with an expensive render is wrapped in cache({ ttl: 60, swr: 300 }) on Cloudflare Workers with a KV namespace, tagged "posts", and invalidated via updateTag("posts") in the publish server action so readers see fresh content immediately after edits. ## Quick Start Ask the AI to wrap your route subtree in a cache() boundary with a TTL and SWR window and wire up a MemorySegmentCacheStore or CFCacheStore in createRouter.