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 zdanovichnick/dotnet-pilot --skill cachinggit clone --depth 1 https://github.com/zdanovichnick/dotnet-pilotWrote 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/zdanovichnick/dotnet-pilot/caching)<a href="https://agentmods.dev/skills/zdanovichnick/dotnet-pilot/caching"><img src="https://agentmods.dev/badge/skills/zdanovichnick/dotnet-pilot/caching/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/zdanovichnick/dotnet-pilot/caching"><img src="https://agentmods.dev/badge/skills/zdanovichnick/dotnet-pilot/caching.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.00035 | $0.00608 |
| Opus 5.5 | $0.00014 | $0.00243 |
| Sonnet 5.5 | $0.00007 | $0.00122 |
| Haiku 4.5 | $0.00003 | $0.00061 |
Grade A, and why
caching 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 — 46 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Caching Patterns
Reference for caching in .NET APIs. Covers HybridCache (L1+L2), output caching, cache-aside, and IMemoryCache.
Caching Options at a Glance
| Option | Best For | Notes |
|---|---|---|
HybridCache |
Application-level data (entities, computed results) | .NET 9+; L1 in-process + L2 distributed; stampede protection |
Output caching (IOutputCacheStore) |
HTTP response caching (full responses) | Middleware-level; [OutputCache] attribute or .CacheOutput() |
IMemoryCache |
Single-node, simple key-value, no distributed requirement | No stampede protection; use GetOrCreateAsync |
IDistributedCache |
Distributed session, custom serialization | Low-level; HybridCache wraps it |
References
Load only the file the task needs:
| File | Covers |
|---|---|
references/hybridcache.md |
Package, registration, usage, invalidation, typed cache keys |
references/output-cache.md |
Output-cache registration, [OutputCache] / .CacheOutput() usage, invalidation |
references/cache-aside-and-keys.md |
Cache-aside pattern, IMemoryCache for single-node apps, multi-tenant key strategy |
Do / Don't
| Do | Don't |
|---|---|
Use HybridCache as the default for application data |
Use IMemoryCache in a multi-node deployment for shared data |
| Always set an expiration | Cache indefinitely (memory leak, stale data) |
| Use typed key factory to avoid magic strings | Scatter $"product:{id}" literals across the codebase |
Cache sealed, immutable DTOs (see the reuse gotcha in references/hybridcache.md) |
Cache tracked EF entities or mutable objects (mutations won't propagate) |
| Scope keys by tenant ID in multi-tenant apps | Share cache entries across tenants |
Log cache misses at Debug level |
Log every cache hit (too noisy) |
| Invalidate on write (cache-aside write-through) | Let stale data live beyond TTL without a manual eviction path |
| Use tags for group invalidation | Enumerate and delete keys by prefix (fragile, slow) |
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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 Changed · -223 lines 3aa518bb1dab
- 1mo ago First seen · 269 lines · 35 tokens per session scan A 46ef05b9e247
caching is a skill published in the GitHub repository zdanovichnick/dotnet-pilot (5 stars, last pushed 19d ago), licensed MIT. It adds 35 tokens to every session and 608 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
nextjs-cache-architecture
Use this skill whenever the user wants to design or implement caching in a Next.js 16+ App Router project — setting up the "use cache" directive, building a cache tag registry, wiring mutations to invalidation utilities, structuring Suspense boundaries for partial prerendering, handling personalized content near cache…
azure-resource-manager-redis-dotnet
Azure Resource Manager SDK for Redis in .NET. Use for MANAGEMENT PLANE operations: creating/managing Azure Cache for Redis instances, firewall rules, access keys, patch schedules, linked servers (geo-replication), and private endpoints via Azure Resource Manager. NOT for data plane operations (get/set keys, pub/sub) …
building-agents
Use when building or restructuring an LLM agent — provider adapter, tool calling, structured output, RAG, agent loop, eval gate, cost routing, tracing, MCP server — model-agnostic across OpenAI/Anthropic/Gemini/OSS so a model swap is a config change. NOT vector-store SQL alone (that is postgresdb) or service…
bun-redis
Use when working with Redis in Bun (ioredis, Upstash), caching, pub/sub, session storage, or key-value operations.
redis-best-practices
Redis development best practices for caching, data structures, and high-performance key-value operations.
database-expert
Advanced database design and administration for PostgreSQL, MongoDB, and Redis. Use when designing schemas, optimizing queries, managing database performance, or implementing data patterns.