cache-strategy-planner
Skill26 starsChanged 4 months agoMITView on GitHub
Designs multi-tier caching architectures (CDN, Redis, memory), invalidation policies, and stampede mitigations.
In this repository119 other files it gives its agents.
- adr-writerSkill
- architecture-reviewerSkill
- cost-optimization-auditorSkill
- cqrs-event-sourcing-designerSkill
- disaster-recovery-plannerSkill
- event-driven-architectSkill
- feature-flag-lifecycle-managerSkill
- migration-plannerSkill
- multi-tenant-data-partitionerSkill
- project-plannerSkill
- rate-limiting-architectSkill
- tech-debt-assessorSkill
- zero-downtime-migration-plannerSkill
- api-designerSkill
- bug-hunterSkill
- code-reviewerSkill
- concurrency-race-detectorSkill
- database-architectSkill
- dependency-auditorSkill
- error-handling-architectSkill
- graphql-schema-designerSkill
- legacy-code-refactorerSkill
- memory-leak-detectorSkill
- microservices-boundary-definerSkill
- performance-auditorSkill
- pr-reviewerSkill
- refactor-expertSkill
- resilience-circuit-breaker-designerSkill
- security-auditorSkill
- sql-query-optimizerSkill
- state-machine-designerSkill
- typescript-guardianSkill
- websocket-protocol-designerSkill
- adr-generatorSkill
- changelog-generatorSkill
- codebase-glossary-builderSkill
- commit-message-expertSkill
- contributor-guide-writerSkill
- documentation-writerSkill
- executive-summary-writerSkill
- readme-builderSkill
- release-notes-writerSkill
- rfc-proposal-writerSkill
- runbook-generatorSkill
- sdk-getting-started-writerSkill
- status-update-writerSkill
- ci-cd-pipeline-optimizerSkill
- context-window-optimizerSkill
- git-conflict-resolverSkill
- interview-question-generatorSkill
- meeting-notes-distillerSkill
- monorepo-workflow-architectSkill
- onboarding-guide-generatorSkill
- on-call-handover-writerSkill
- prompt-enhancerSkill
- retro-facilitatorSkill
- task-breakdown-assistantSkill
- tech-debt-burndown-plannerSkill
- cognitive-bias-detectorSkill
- decision-makerSkill
- The first 60 shown.
The file
Files
Purpose
Architect robust, multi-layer caching strategies (HTTP/CDN edge, distributed Redis/Memcached, in-process local memory) with explicit TTLs, cache invalidation hooks, and cache stampede (thundering herd) protections.
When to Use
- High-read database bottlenecks or slow third-party API response times.
- Designing CDN caching rules (
Cache-Control,stale-while-revalidate, surrogate keys). - Fixing cache stampedes that crash origin servers when popular cache keys expire.
What to Analyze
- Cache Tier Selection: L1 (In-memory LRU, sub-millisecond) vs L2 (Redis Cluster, 1-2ms) vs Edge CDN (Cloudflare/Fastly).
- Write Strategy: Cache-Aside (Lazy Loading), Write-Through, Write-Behind (Write-Back).
- Invalidation Policy: Time-To-Live (TTL) with jitter vs Event-driven explicit key purge vs Tag-based invalidation.
- Stampede & Thundering Herd Defense: Mutex locking (singleflight pattern) or probabilistic early expiration (XFetch algorithm).
- Serialization & Memory Footprint: Protobuf, MessagePack, or compressed JSON over raw strings.
Output Format
- Caching Architecture Diagram: Data flow between Client, CDN, Redis, and Database.
- Cache Policy Table: [Data Type | Storage Tier | TTL | Invalidation Trigger | Stampede Defense].
- Singleflight / Cache Wrapper Code: Production-ready caching utility with fallback.
Avoid
- Caching mutable data without a clear invalidation strategy.
- Omitting TTL jitter (all cache keys expiring at the exact same second).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

