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 KraitDev/skiLL.Md --skill caching-strategiesgit clone --depth 1 https://github.com/KraitDev/skiLL.MdWrote 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/kraitdev/skill.md/caching-strategies)<a href="https://agentmods.dev/skills/kraitdev/skill.md/caching-strategies"><img src="https://agentmods.dev/badge/skills/kraitdev/skill.md/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/kraitdev/skill.md/caching-strategies"><img src="https://agentmods.dev/badge/skills/kraitdev/skill.md/caching-strategies.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00015 | $0.01898 |
| Opus 5.5 | $0.00006 | $0.00759 |
| Sonnet 5.5 | $0.00003 | $0.00380 |
| Haiku 4.5 | $0.00002 | $0.00190 |
Grade A, and why
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 1mo ago.
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 — 201 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Caching Strategies
Purpose
Databases are slow; caches are fast. This skill teaches teams to strategically cache frequently accessed data in fast storage (Redis, Memcached) to intercept requests before they hit the database, dramatically reducing latency and database load. Caching is NOT a substitute for proper database optimization.
When to use
- System is experiencing high latency on read-heavy API endpoints
- Database CPU/Memory usage is constantly peaking due to repeated queries
- Designing a new system expecting massive read throughput
- Content rarely changes but reads happen constantly
When NOT to use
- Before optimizing database queries (optimize first, cache second)
- For data that changes frequently or is highly personalized
- When consistency is more important than performance
- As a quick fix for poor application architecture
Inputs required
- Slow query logs or endpoint metrics
- Cache infrastructure (Redis, Memcached)
- Read/write patterns of the data
- Acceptable staleness window (TTL)
Workflow
- Identify Bottlenecks: Profile APIs to find read-heavy, slow-changing data (user profiles, static config, product catalogs)
- Measure Access Patterns: How often is data read vs. written? How large? How old can it be?
- Select Strategy:
- Cache-Aside: App checks cache; on miss, fetches DB, writes cache
- Write-Through: App writes to cache and DB simultaneously
- Write-Behind: App writes to cache only; batch updates to DB later (use cautiously)
- Set Eviction Policy: Assign Time-To-Live (TTL) values based on business tolerance for stale data
- Handle Invalidation: Implement cache invalidation logic on mutations (UPDATE/DELETE)
- Prevent Stampedes: Implement caching locks or staggered TTLs to prevent multiple clients fetching from DB simultaneously when a key expires
- Add Monitoring: Track cache hit rates, eviction rates, and staleness
Rules
- MUST treat cache as ephemeral (can disappear at any time)
- MUST NOT cache highly personalized or sensitive data (PII) in shared caches
- MUST ALWAYS implement fallback to primary data store on cache failure
- MUST set TTL values (no infinite cache)
- MUST invalidate cache on mutations (UPDATE, DELETE operations)
- MUST use separate caches for different data types/sensitivity levels
- MUST NOT use cache as source of truth
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.
- 1mo ago First seen · 201 lines · 15 tokens per session scan A a4e433ceaed1
caching-strategies is a skill published in the GitHub repository KraitDev/skiLL.Md (6 stars, last pushed 4mo ago), licensed MIT. It adds 15 tokens to every session and 1,898 once invoked, about $0.0001 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-31.
Other skills, from other repositories
flutter-dio-cache-interceptor-engineering
Use when adding, reviewing, debugging, testing, or tuning diocacheinterceptor in a Flutter or Dart Dio client. Covers CacheOptions, CachePolicy, HTTP revalidation, cache stores, offline fallback, authenticated-user key isolation, invalidation, platform compatibility, and 4.x migration. Trigger for stale Dio responses…
sql-query-optimization
Diagnoses and optimises slow SQL queries using EXPLAIN ANALYZE. Covers identifying bottlenecks (sequential scans, bad estimates, heap fetches), index strategy, query rewrites, and verification. Invoked when the user asks to optimize a query, fix a slow database query, or improve database performance.
flutter-caching
Design, implement, review, debug, test, and measure production caching in Flutter/Dart apps across Android, iOS, Web, Windows, macOS, and Linux. Use when a Flutter task mentions caching, offline data, stale data, TTL, invalidation, request deduplication, cache keys, response storage, cache directories, HTTP…
ecommerce-caching
Improve store performance with a layered caching strategy — CDN edge caching, Redis application cache, and smart cart-aware invalidation.
caching-strategies
Design multi-tier caching architectures for web applications — cache-aside vs write-through vs write-behind, TTL design, cache invalidation, Redis patterns, CDN configuration, browser caching, and stampede prevention. Use when choosing a caching pattern, designing cache invalidation strategies, implementing Redis…
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…