@@ -6,6 +6,7 @@ import createLruHandler from "@fortedigital/nextjs-cache-handler/local-lru";
66import createRedisHandler from "@fortedigital/nextjs-cache-handler/redis-strings" ;
77import createCompositeHandler from "@fortedigital/nextjs-cache-handler/composite" ;
88import { ioredisAdapter } from "@fortedigital/nextjs-cache-handler/helpers/ioredisAdapter" ;
9+ import { getClientInfoTag } from "@fortedigital/nextjs-cache-handler/helpers/getClientInfoTag" ;
910
1011const isSingleConnectionModeEnabled = ! ! process . env . REDIS_SINGLE_CONNECTION ;
1112const redisType = process . env . REDIS_TYPE || "redis" ; // "redis" or "ioredis"
@@ -17,7 +18,11 @@ async function setupRedisClient() {
1718 try {
1819 if ( redisType === "ioredis" ) {
1920 console . info ( `Using ioredis client...` ) ;
20- const ioredisClient = new Redis ( process . env . REDIS_URL ) ;
21+ const ioredisClient = new Redis ( process . env . REDIS_URL , {
22+ // Set clientInfoTag for Redis driver identification
23+ // This helps identify the framework in CLIENT LIST output
24+ clientInfoTag : getClientInfoTag ( ) ,
25+ } ) ;
2126
2227 // Wait for connection to be ready
2328 console . info ( "Connecting ioredis client..." ) ;
@@ -35,6 +40,9 @@ async function setupRedisClient() {
3540 redisClient = createClient ( {
3641 url : process . env . REDIS_URL ,
3742 pingInterval : 10000 ,
43+ // Set clientInfoTag for Redis driver identification
44+ // This helps identify the framework in CLIENT LIST output
45+ clientInfoTag : getClientInfoTag ( ) ,
3846 } ) ;
3947
4048 console . info ( "Connecting Redis client..." ) ;
0 commit comments