Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add j4flmao/agent-skills --skill caching-strategiesgit clone --depth 1 https://github.com/j4flmao/agent-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/j4flmao/agent-skills/caching-strategies)<a href="https://agentmods.dev/skills/j4flmao/agent-skills/caching-strategies"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/caching-strategies/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/j4flmao/agent-skills/caching-strategies"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/caching-strategies.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00138 | $0.02520 |
| Opus 5.5 | $0.00055 | $0.01008 |
| Sonnet 5.5 | $0.00028 | $0.00504 |
| Haiku 4.5 | $0.00014 | $0.00252 |
Grade A, and why
backend-caching-strategies scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 225 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Caching Strategies with Redis
Purpose
Choose the right application-level caching pattern for a data access path and implement it so that the cache never becomes a source of wrong answers or outages. Covers read/write patterns, invalidation, stampede protection, and behaviour when Redis is unavailable.
Agent Protocol
Trigger
Exact user phrases: "cache-aside", "write-through", "write-behind", "read-through", "cache invalidation", "redis cache pattern", "cache stampede", "thundering herd", "TTL jitter", "stale cache".
Input Context
- Read/write ratio and acceptable staleness for the data.
- Source of truth (PostgreSQL, MySQL, remote API) and who writes to it.
- Language/client library (go-redis v9, ioredis/node-redis, redis-py, Lettuce).
- Single Redis, Sentinel, or Cluster.
Output Artifact
Pattern choice with rationale plus code for read path, write path and invalidation. No files unless requested.
Response Format
Data: {entity / query}
Pattern: {cache-aside | read-through | write-through | write-behind}
Key: {key template} TTL: {base} + jitter {range}
Invalidation: {delete-on-write | versioned key | event-driven}
Stampede guard: {singleflight | lock | early refresh | none}
Redis down: {fall through to DB | serve stale | fail}
Pattern Selection
| Pattern | Read path | Write path | Consistency | Use when |
|---|---|---|---|---|
| Cache-aside | App reads cache, on miss loads DB and populates | App writes DB, then deletes key | Eventual; short stale window | Default for most read-heavy data |
| Read-through | Cache layer/library loads on miss | Same as cache-aside | Same as cache-aside | You want loading logic centralised in a cache wrapper |
| Write-through | Cache always populated | App writes DB and cache in the same request | Stronger, but two writes can diverge on partial failure | Data read immediately after write, small hot set |
| Write-behind | Cache is primary | Write to cache, flush to DB asynchronously | Risk of data loss if cache dies before flush | Counters, metrics, write-coalescing where loss is tolerable |
| Refresh-ahead | Background refresh before expiry | n/a | Fresh for hot keys | Predictable hot keys with expensive loads |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday Changed · +170 lines · +119 tokens per session d316102519ef
- 1mo ago First seen · 55 lines · 19 tokens per session scan A 689f1e529e52
backend-caching-strategies is a skill published in the GitHub repository j4flmao/agent-skills (35 stars, last pushed yesterday), licensed MIT. It adds 138 tokens to every session and 2,520 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
caching
Caching strategies — invalidation, TTL guidelines, cache keys, cache layers, and when not to cache. Use when implementing or reviewing caching logic.
cache-strategy-invalidation-expert
Redis caching patterns, cache-aside, write-through, TTL strategies, and invalidation. Activate on: caching, Redis, cache invalidation, cache-aside, write-through, TTL, CDN cache, stale-while-revalidate. NOT for: CDN/reverse proxy setup (use api-gateway-reverse-proxy-expert), database query optimization (use…
nestjs-caching
Implement multi-level caching, invalidation patterns, and stampede protection in NestJS. Use when adding Redis caching layers, configuring cache-manager interceptors, implementing stale-while-revalidate, or preventing cache stampedes in NestJS services.
caching
Redis patterns (pub/sub, queues, TTL), in-process caching, cache-aside strategy, invalidation, Python and Node clients.
ecommerce-caching
Improve store performance with a layered caching strategy — CDN edge caching, Redis application cache, and smart cart-aware invalidation.
cache-design
Design a caching strategy for an application — pattern selection, key design, TTL, and eviction policy. Use when asked to "add caching to this", "design a cache strategy", or "what should we cache".