caching

Implements Redis-based caching strategies for Node.js and NestJS services.

3|Updated Apr 12, 2026
One-click install
npx skills add https://github.com/mauriciodelrio/delriodev-skills --skill caching-mauriciodelrio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: caching
Source: https://github.com/mauriciodelrio/delriodev-skills/tree/main/es-skills/software/backend/caching
Command: npx skills add https://github.com/mauriciodelrio/delriodev-skills --skill caching-mauriciodelrio

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reduce latency and database load in Node.js backend services by introducing reliable caching mechanisms such as Redis, key naming conventions, TTL management, and HTTP cache headers.

Core Features & Use Cases

  • Implement cache-aside, write‑through, and write‑behind strategies.
  • Provide Redis‑based CacheService with generic get, set, delete, and pattern‑based invalidation methods.
  • Define consistent key naming conventions and appropriate TTL values for different data types.
  • Integrate caching in NestJS using built‑in cache module and decorators.
  • Configure HTTP cache headers and ETag support for API responses.
  • Apply advanced techniques like cache‑stampede prevention and tag‑based invalidation.

Quick Start

Usa la skill de caching para crear un CacheService con Redis y configurar TTLs en tu aplicación NestJS.

Frequently Asked Questions about caching

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement cache-aside and write-through patterns in NestJS?

To implement cache-aside and write-through patterns in NestJS, use a Redis-based CacheService with generic get, set, and delete methods alongside the built-in NestJS cache module and decorators. This approach applies consistent key naming conventions and TTL management to reduce database load effectively.

What's the best way to prevent cache stampedes in a Node.js backend?

The best way to prevent cache stampedes in a Node.js backend is by applying advanced caching techniques within your Redis CacheService. This Skill provides mechanisms for cache-stampede prevention and tag-based invalidation to ensure reliable performance under high concurrency.

How do I configure HTTP cache headers and ETags for API responses?

You can configure HTTP cache headers and ETag support for API responses by integrating caching strategies directly into your Node.js service. This Skill guides the configuration of HTTP cache headers to optimize API response delivery and reduce latency.

Does this caching approach support pattern-based cache invalidation with Redis?

Yes, this caching approach supports pattern-based cache invalidation with Redis. The CacheService includes generic delete and pattern-based invalidation methods, allowing you to efficiently clear specific keys or groups of cached data using tags and consistent naming conventions.

When should I use write-behind caching instead of cache-aside?

You should use write-behind caching instead of cache-aside when you need to asynchronously write data to the database after updating the cache, reducing write latency. Cache-aside is better suited for read-heavy workloads where data is loaded into the cache only when requested.