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

@dictu/nextjs-redis-sentinel-cache-handler

v0.1.0

Published

Next.js cache handler backed by ioredis with Redis Sentinel support.

Readme

@dictu/nextjs-redis-sentinel-cache-handler

Next.js cache handler backed by ioredis, with support for Redis Sentinel, direct Redis connections, tag revalidation, replica reads, and a filesystem fallback when Redis is unavailable.

Features

  • Redis Sentinel support for master/replica setups
  • Direct Redis mode for simpler deployments
  • Filesystem fallback when Redis is unavailable
  • Tag-based invalidation via revalidateTag()
  • Circuit breaker to avoid repeated failures during Redis outages

Install

npm install @dictu/nextjs-redis-sentinel-cache-handler ioredis

next is a peer dependency and is expected to already be present in your Next.js app.

Usage

Configure your Next.js app to use the package as its cache handler:

// next.config.js
module.exports = {
  cacheHandler: require.resolve('@dictu/nextjs-redis-sentinel-cache-handler'),
  cacheMaxMemorySize: 0,
}

Configuration

Sentinel mode

REDIS_SENTINEL_URL=redis://sentinel-1:26379,redis://sentinel-2:26379,redis://sentinel-3:26379
REDIS_SENTINEL_MASTER_NAME=myprimary
REDIS_PASSWORD=your-password
REDIS_CACHE_PREFIX=cache:
REDIS_CACHE_DEBUG_LEVEL=0

Direct Redis mode

REDIS_URL=redis://redis-host:6379
REDIS_PASSWORD=your-password
REDIS_CACHE_PREFIX=cache:
REDIS_CACHE_DEBUG_LEVEL=0

Environment variables

| Variable | Required | Description | | --- | --- | --- | | REDIS_SENTINEL_URL | Sentinel mode | Comma-separated Redis Sentinel URLs. | | REDIS_SENTINEL_MASTER_NAME | No | Sentinel master name. Defaults to myprimary. | | REDIS_URL | Direct mode | Direct Redis connection URL. | | REDIS_PASSWORD | No | Password used for Redis and Sentinel. | | REDIS_CACHE_PREFIX | No | Key prefix. Defaults to cache:. | | REDIS_CACHE_DEBUG_LEVEL | No | 0 = silent, 1 = errors, 2 = warnings, 3 = debug. |

Use either Sentinel mode or direct mode. If neither REDIS_SENTINEL_URL nor REDIS_URL is configured, the handler will fall back to the Next.js filesystem cache only.

Development

npm install
npm run typecheck
npm run build

License

EUPL-1.2