caching
Skill by codewithmukesh
Teaches caching strategies for .NET 10 applications, covering HybridCache, output caching, response caching and distributed cache patterns. Aimed at developers who want to speed up reads or reduce database load.
Install caching
Built from the published package, never by AI.
git clone --depth 1 https://github.com/codewithmukesh/dotnet-claude-kit /tmp/dotnet-claude-kit && mkdir -p ~/.claude/skills && cp -r /tmp/dotnet-claude-kit/skills/caching ~/.claude/skills/cachingRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/codewithmukesh/dotnet-claude-kit /tmp/dotnet-claude-kit && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/dotnet-claude-kit/skills/caching ~/.gemini/antigravity-cli/skills/cachingAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
The caching skill gives an AI assistant guidance on caching strategies for .NET 10 applications. It centres on HybridCache, which the source calls the default, combining in-memory (L1) and distributed (L2) caching with stampede protection. The skill also covers output caching for full HTTP responses, response caching, and distributed cache patterns.
It includes code patterns for HybridCache lookups, cache invalidation on writes, and output cache tags, along with anti-patterns such as caching without expiration and caching user data under global keys. The source says it is for developers implementing caching, optimizing read performance or reducing database load. It also labels the cache-aside pattern with IDistributedCache as legacy.
Written from the project's SKILL.md and checked against it.
What it can do
- HybridCache lookupsShows GetOrCreateAsync usage with HybridCache and optional expiration settings.
- Redis L2 backendShows adding Redis as a distributed cache behind HybridCache.
- Cache invalidationShows removing cached entries with RemoveAsync after a mutation.
- Output cachingShows CacheOutput policies, route value variation and tag-based eviction.
- Stampede protection guidanceAdvises relying on HybridCache's built-in protection instead of manual locks.
- Anti-pattern reviewLists mistakes such as missing TTLs and user data cached under shared keys.
- Caching decision guideMaps scenarios like single-server or distributed deployment to a caching approach.
What you need
- .NET 10
- Redis (optional, as an L2 distributed cache)
Try asking
- Add HybridCache to my product lookup handler with a 10 minute expiry.
- Set up output caching with tag-based eviction for my products endpoints.
- Review my code for cache entries that have no expiration.
Good to know
- Cache-aside with IDistributedCache is labelled legacy for new code.
- The source advises against caching POST, PUT and DELETE responses.
- Examples are C# code snippets only.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/caching/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md6 KB
Alternatives to caching
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
caching: common questions
Does this skill cover Redis?
Yes. It shows adding Redis as an optional L2 distributed cache behind HybridCache.
What is HybridCache according to this skill?
The source describes it as the default caching abstraction for .NET, combining in-memory and distributed caching with stampede protection.
When should output caching be used?
The source recommends it when the full HTTP response can be cached, such as public APIs or static data.
How do I install caching?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is caching free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is caching safe to use?
It scores 82 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to caching?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
