From 1009fff9e9f2264b6b26078d95ed139becf9f75d Mon Sep 17 00:00:00 2001 From: Ajay Date: Thu, 11 Apr 2024 17:04:17 -0400 Subject: [PATCH] Fix caching issues with one specific key form .c regex was any character plus a c instead of intenced dot --- src/utils/redis.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/redis.ts b/src/utils/redis.ts index 73000cb..1d33e81 100644 --- a/src/utils/redis.ts +++ b/src/utils/redis.ts @@ -383,7 +383,7 @@ async function setupCacheClientListener(cacheClient: RedisClientType, const keys = Buffer.isBuffer(message) ? [message.toString()] : message; for (let key of keys) { - if (config.redis.useCompression) key = key.replace(/.c$/, ""); + if (config.redis.useCompression) key = key.replace(/\.c$/, ""); if (cache.delete(key)) { lastInvalidation = Date.now();