Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

nestjs-caching

Skill by HoangNguyen0403

Guides developers on caching in NestJS services. It covers multi-level caching with Redis, stale-while-revalidate, and stampede protection for high-traffic read endpoints.

  • Score 73
  • 584 stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install nestjs-caching

Built from the published package, never by AI.

git clone --depth 1 https://github.com/HoangNguyen0403/agent-skills-standard /tmp/agent-skills-standard && mkdir -p ~/.claude/skills && cp -r /tmp/agent-skills-standard/skills/nestjs/nestjs-caching ~/.claude/skills/nestjs-caching

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install nestjs-caching in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

The nestjs-caching skill gives an AI assistant caching standards for NestJS services. It describes multi-level caching with an in-memory L1 layer, using lru-cache for config and static data, and a shared Redis L2 layer across pods. It also covers stale-while-revalidate to avoid latency spikes during cache misses, and the use of cache-manager with cache-manager-redis-yet and the CacheInterceptor.

For stampede protection, the skill recommends random jitter on TTLs and locking so one process recomputes while others wait or return stale data. It also explains Redis hashes, sets, and sorted sets, and tag-based invalidation that uses Sets instead of KEYS. It is aimed at developers building NestJS services who need caching on read-heavy endpoints.

Written from the project's SKILL.md and checked against it.

What it can do

  • Multi-level cachingCombines an in-memory L1 layer with a shared Redis L2 layer.
  • Stale-while-revalidateReduces latency spikes during cache misses.
  • CacheInterceptor setupShows how to use @UseInterceptors(CacheInterceptor) for simple GET responses.
  • Stampede protectionAdds TTL jitter and locking so keys do not all expire and recompute at once.
  • Tag-based invalidationGroups cache keys in Redis Sets and deletes them by tag.
  • Event-driven invalidationTriggers cache invalidation asynchronously from domain events such as UserUpdated.
  • Redis data structure guidanceExplains when to use hashes, sets, and sorted sets.

What you need

  • NestJS
  • Redis
  • cache-manager
  • cache-manager-redis-yet

Try asking

  • Add a Redis caching layer to my NestJS product service.
  • Set up stale-while-revalidate for my NestJS read endpoints.
  • Add TTL jitter and locking to prevent cache stampedes in my NestJS service.

Good to know

  • Recommends cache-manager-redis-yet over cache-manager-redis-store for V4 stability.
  • Default CacheInterceptor key URLs need consistent query param ordering or a custom key generator.
  • Advises against in-memory cache storage in multi-pod setups.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/nestjs/nestjs-caching/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md2 KB
  • evals/evals.json2 KB
  • references/example.md497 B

Alternatives to nestjs-caching

All alternatives →
hugging-face-datasetssickn33
94

Creates, configures and manages datasets on the Hugging Face Hub, including SQL-based querying and transformation. Built for people who edit dataset content and metadata directly, alongside the HF MCP server.

AAA Skill 50k
db-repairgarrytan
94

Diagnoses and repairs gbrain's Postgres access when a command or MCP result shows a GBRAIN_DB_ACCESS marker, or when the operator reports the brain database is down. It runs the hardcoded gbrain db-repair ladder and verifies the result with a re-probe.

AAA Skill 34k
alloydb-basicsgoogle
94

Manages clusters, instances, and backups for AlloyDB for PostgreSQL. Built for creating, configuring, and administering AlloyDB databases, not general PostgreSQL or Cloud SQL instances.

AAA Skill 26k
clickhouse-logs-queriessupabase
94

Writes, reviews and migrates Supabase logs queries against the ClickHouse logs table served by the logs.all.otel endpoint. Built for developers who write Logs Explorer SQL or convert older BigQuery logs queries.

AAA Skill 116k
fix-slow-queriespaperclipai
94

Diagnoses and fixes slow Paperclip PostgreSQL queries using Cloud and Neon evidence, local benchmarks, regression tests, and a pull request with passing checks. Built for engineers working on Paperclip.

AAA Skill 119k
prisma-8prisma
94

Guides AI assistants through Prisma 8 projects built on @prisma/orm-postgres, @prisma/orm-sqlite, or @prisma/orm-mongo. It covers data contracts, migrations, typed queries and runtime setup for developers on Prisma 8.

AAA Skill 48k

Compare with hugging-face-datasets, db-repair or alloydb-basics

nestjs-caching: common questions

Does this skill use Redis for caching?

Yes. It uses Redis as the distributed L2 cache shared across pods, with cache-manager-redis-yet as the recommended store.

How does it prevent cache stampedes?

It adds random jitter to TTLs so keys do not expire together, and uses locking so one process recomputes while others wait or return stale data.

Why does it avoid the KEYS command for invalidation?

The source says KEYS is O(N) and should not be used in production. It recommends grouping keys with Redis Sets instead.

How do I install nestjs-caching?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is nestjs-caching free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is nestjs-caching safe to use?

It scores 73 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 nestjs-caching?

Similar skills: hugging-face-datasets, db-repair, alloydb-basics, clickhouse-logs-queries.

nestjs-caching Install

Add to stack

Loading.