npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

redis-super-cache

v2.0.2

Published

Production Redis caching with fflate compression, tag invalidation, stampede protection, pipelines, warmup, and Prometheus metrics

Readme

Redis Super Cache

npm version license GitHub

Repository: github.com/sameir13/redis-super-cache

Production Redis caching for Node.js — wrap, tag, invalidate.

redis-super-cache is a production layer on top of redis@4 with compression, tag-based bulk invalidation, stampede protection, pipeline batching, cache warmup, and Prometheus metrics.

Install

# Node.js or Express
npm install redis-super-cache redis

# NestJS
npm install redis-super-cache redis-super-cache-nestjs redis

Requires Node.js ≥ 18.

Step-by-step guides (start here)

Full code walkthroughs from empty project to working app:

| Guide | Stack | What you build | |---|---|---| | Node.js guide | Vanilla http | API with cache, tags, metrics | | Express guide | Express.js | REST users API + invalidation | | NestJS guide | NestJS | Module, @Cacheable, warmup, /metrics |

Also see Getting started for Redis setup and prerequisites.

Quick start (30 seconds)

import { createClient } from "redis";
import { createTagCache } from "redis-super-cache";

const client = createClient({ url: process.env.REDIS_URL });
await client.connect();

const cache = createTagCache({ client: client as never });

const user = await cache.wrap(
  "user:1",
  () => db.user.findUnique({ where: { id: 1 } }),
  { ttl: 3600, tags: ["users"] }
);

await cache.invalidateTag("users");

NestJS quick start

import { Module, Injectable } from "@nestjs/common";
import { TagCacheModule, InjectTagCache, Cacheable } from "redis-super-cache-nestjs";
import type { TagCache } from "redis-super-cache";

@Module({
  imports: [
    TagCacheModule.forRoot({
      isGlobal: true,
      redis: { url: process.env.REDIS_URL },
      enableMetricsController: true,
    }),
  ],
})
export class AppModule {}

@Injectable()
export class UsersService {
  @InjectTagCache() tagCache!: TagCache;

  @Cacheable({ key: (id: number) => `user:${id}`, ttl: 3600, tags: ["users"] })
  async findOne(id: number) {
    return this.db.user.findUnique({ where: { id } });
  }
}

See the full NestJS guide for complete project setup.

When to use Redis Super Cache

| Use redis-super-cache when… | Use something else when… | |---|---| | You cache in Redis in production | You need in-memory + Redis tiers → cache-manager | | You need tag invalidation (users, posts) | You only cache HTTP responses → @nestjs/cache-manager | | You want compression + metrics built in | You want a generic key-value store → raw redis client |

Feature matrix

| Feature | redis-super-cache | cache-manager | Thin Redis wrapper | |---|---|---|---| | Compression | Built-in | No | Manual | | Tag invalidation | Built-in | Store-dependent | Manual | | Stampede protection | Built-in | Partial | Manual | | Prometheus metrics | Built-in | No | Manual | | NestJS module + decorators | redis-super-cache-nestjs | @nestjs/cache-manager | Manual | | Multi-store (L1+L2) | No | Yes | No |

Documentation

Step-by-step guides

| Guide | Description | |---|---| | Getting started | Prerequisites, Redis setup, doc map | | Node.js guide | Complete vanilla Node tutorial | | Express guide | Complete Express tutorial | | NestJS guide | Complete NestJS tutorial |

Reference

| Doc | Topic | |---|---| | Core API | All methods | | Tags | Bulk invalidation | | Compression & keys | Memory, hashing | | Metrics | Prometheus | | Warmup | Startup warming | | Configuration | All options | | Migration | Upgrading from v1 | | Troubleshooting | Common issues | | Benchmarks | Performance |

Packages

| npm package | Description | |---|---| | redis-super-cache | Core library | | redis-super-cache-nestjs | NestJS module, decorators, metrics controller |

License

MIT — see LICENSE.