home / skills / harborgrid-justin / lexiflow-premium / advanced-ssr-cache-design
/frontend/.github-skills/advanced-ssr-cache-design
This skill engineers SSR caching strategies that preserve correctness under concurrent updates and streaming, optimizing cache hits and invalidation.
npx playbooks add skill harborgrid-justin/lexiflow-premium --skill advanced-ssr-cache-designReview the files below or copy the command above to add this skill to your agents.
---
name: advanced-ssr-cache-design
description: Engineer SSR caching strategies that preserve correctness under concurrent updates and streaming.
---
# Advanced SSR Cache Design (React 18)
## Summary
Engineer SSR caching strategies that preserve correctness under concurrent updates and streaming.
## Key Capabilities
- Design cache keys that include routing and personalization parameters.
- Implement safe cache invalidation with deterministic outcomes.
- Integrate cache policy with streaming SSR.
## PhD-Level Challenges
- Formalize correctness conditions for SSR cache hits.
- Analyze cache coherence across distributed render nodes.
- Derive optimal cache TTL under churn.
## Acceptance Criteria
- Provide cache policy documentation and tests.
- Demonstrate correctness under concurrent personalization.
- Report cache hit ratios before/after tuning.
This skill engineers server-side rendering (SSR) cache strategies that remain correct during concurrent updates and streaming responses. It focuses on deterministic cache keys, safe invalidation, and policies that integrate with React 18 streaming. The goal is repeatable correctness, measurable hit ratios, and practical guidance for distributed render nodes.
The skill inspects routing, personalization signals, and request metadata to build deterministic cache keys that avoid accidental collisions. It embeds invalidation hooks and versioning to ensure deterministic outcomes when content changes concurrently. It also integrates cache policies with streaming SSR so partial responses and progressive rendering honor cache semantics and safety guarantees.
How do I avoid serving stale personalized content?
Build keys that include personalization scope and a version token; cache only fragments safe to reuse while rendering sensitive parts per request.
Can streaming SSR be cached safely?
Yes—cache complete safe fragments and ensure streaming boundaries are deterministic. Use versioning and tests that simulate partial-response interleaving to confirm correctness.