Backend Caching

Use when the user asks about caching, adding a Redis cache in front of a query, cache-aside, write-through, cache invalidation, TTL jitter, cache stampede or Memcached. Produces a cache strategy with keys, TTLs, invalidation and code. Not for browser/HTTP caching (use frontend-browser-caching) or distributed locks (use backend-distributed-locking).

45 stars 6 forksSoftware Development

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add j4flmao/agent-skills --skill backend-caching
Manual install
git clone --depth 1 https://github.com/j4flmao/agent-skills.git /tmp/agent-skills
mkdir -p ~/.claude/skills
cp -r /tmp/agent-skills/skills/backend/universal/caching ~/.claude/skills/backend-caching

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Backend Caching

## Purpose
Design consistent, production-grade caching layers. Every cache must follow the same conventions for strategy selection, data flow, invalidation, stampede prevention, TTL management, and monitoring.

## Agent Protocol

### Trigger
Exact user phrases: "cache", "Redis", "Memcached", "CDN", "cache-aside", "read-through", "write-through", "write-behind", "cache invalidation", "TTL", "cache stampede", "thundering herd", "cache warming", "LRU", "LFU", "cache hit ratio", "cache strategy", "design a caching layer", "add caching".

### Input Context
- The data being cached (DB query result, computed value, API response, static asset).
- The read/write ratio.
- The consistency requirement (eventual vs strong).
- The hosting topology (single node, clustered, multi-region).

### Output Artifact
Caching strategy specs as text. No file unless requested.

### Response Format
```
Layer: {application | distributed | CDN}
Store: {Redis | Memcached | CDN | in-memory}
Strategy: {cache-aside | read-through | write-through | write-behind}
Key format: {namespace}:{entity}:{id}
TTL: {duration}
Invalidation: {manual | TTL-based | event-driven}
Stampede protection: {yes/no — method}
```

No preamble. No postamble. No explanations. No filler/hedging/transitions.

### Completion Criteria
- [ ] Cache strategy selected with justification
- [ ] Key naming convention defined with namespaces
- [ ] TTL set for every cache entry (no infinite TTL unless immutable data)
Read the full skill on GitHub

Details

Skill name
backend-caching
Path
skills/backend/universal/caching/SKILL.md
License
MIT
Repo updated
17 November 2026

FAQ

What does the Backend Caching skill do?

Use when the user asks about caching, adding a Redis cache in front of a query, cache-aside, write-through, cache invalidation, TTL jitter, cache stampede or Memcached. Produces a cache strategy with keys, TTLs, invalidation and code. Not for browser/HTTP caching (use frontend-browser-caching) or distributed locks (use backend-distributed-locking).

How do I install the Backend Caching skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add j4flmao/agent-skills --skill backend-caching. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Backend Caching popular?

It lives in j4flmao/agent-skills, which has 45 GitHub stars and 6 forks.

Related skills

Agent Observability

45

j4flmao/agent-skills

Use when the user asks about agent observability, tracing agent reasoning, debugging an agent loop, OpenTelemetry GenAI spans for LLM calls, LLM cost tracking per agent, agent audit logs or hallucination/eval monitoring in production. Produces instrumentation config, trace schema, dashboards, alerts and cost attribution. Not for generic service tracing without LLMs (use devops-opentelemetry).

DevOps & Cloud

AI Agent Architectures

45

j4flmao/agent-skills

Use when the user asks to build an AI agent, design an agent that calls tools and keeps memory, write an agent system prompt or pick an agent framework (Claude Agent SDK, OpenAI Agents SDK, LangGraph). Produces an architecture brief covering loop, tools, memory, guardrails and evals, routing depth to child skills. Not for workflow patterns (use ai-agentic-workflows).

AI, LLMs & Agents

AI Agent Core Loop

45

j4flmao/agent-skills

Use when the user asks about the agent loop, ReAct vs plan-and-solve, re-planning, Reflexion, an agent stuck in a loop, max iterations or termination conditions. Produces a loop spec or patch with state, success predicate, caps and no-progress detection. Not for overall agent design (use ai-agent-architectures) or tool schemas (use tool-calling-principles).

AI, LLMs & Agents

Backend Clean Architecture

45

j4flmao/agent-skills

Use when the user asks where code belongs, clean architecture, hexagonal, ports and adapters, domain vs application vs infrastructure layer, or service vs repository. Produces a layer map and dependency rules. Not for GoF pattern choice (use design-patterns) or DDD modeling (use architecture-domain-driven-design).

Software Development

Backend Bulk Import

45

j4flmao/agent-skills

Use when the user asks about bulk import, CSV upload, importing a million-row CSV without locking the table, Excel import, row validation error reports, upsert from file or import progress. Produces a streaming import pipeline with staging, batching and an error report. Not for file upload storage itself (use backend-file-storage).

Software Development

Backend Concurrency Mechanics

45

j4flmao/agent-skills

Use when the user asks about race conditions, data races, deadlocks, mutex vs atomic, memory model, thread pool sizing, virtual threads, goroutines vs threads or blocking the event loop. Produces an explanation of runtime concurrency mechanics with fixes. Not for distributed locks (use backend-distributed-locking).

Software Development

Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.