Skip to content

feat: add redis driver identification#201

Merged
AyronK merged 1 commit intofortedigital:masterfrom
vchomakov:add-client-info-tag
Feb 20, 2026
Merged

feat: add redis driver identification#201
AyronK merged 1 commit intofortedigital:masterfrom
vchomakov:add-client-info-tag

Conversation

@vchomakov
Copy link
Copy Markdown
Contributor

Summary

Adds getClientInfoTag helper function for Redis driver identification.

Changes

  • Added getClientInfoTag() helper that returns a client info tag like nextjs-cache-handler_v2.5.1
  • Added tests for the helper
  • Updated example to use the new helper with both node-redis and ioredis

Why

This helps identify the library using the Redis client in CLIENT LIST output, useful for debugging and monitoring Redis connections.

Usage

import { getClientInfoTag } from '@fortedigital/nextjs-cache-handler/helpers/getClientInfoTag';

// node-redis
const client = createClient({
  url: 'redis://localhost:6379',
  clientInfoTag: getClientInfoTag(),
});

// ioredis
const client = new Redis(process.env.REDIS_URL, {
  clientInfoTag: getClientInfoTag(),
});

@AyronK AyronK self-requested a review February 13, 2026 08:31
Copy link
Copy Markdown
Collaborator

@AyronK AyronK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good addition, thanks! I will test it and take further later this week.

@AyronK AyronK merged commit 06ba16e into fortedigital:master Feb 20, 2026
AyronK pushed a commit that referenced this pull request Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants