From 44bce1e6d7c1624b08dc1fd76b73fab0f405c3a8 Mon Sep 17 00:00:00 2001 From: morteza-mortezai Date: Thu, 18 Dec 2025 10:01:04 +0330 Subject: [PATCH] cache bug --- src/config/cache.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config/cache.config.ts b/src/config/cache.config.ts index f70f98c..c2134ea 100755 --- a/src/config/cache.config.ts +++ b/src/config/cache.config.ts @@ -11,12 +11,12 @@ export function cacheConfig(): CacheModuleAsyncOptions { useFactory: async (configService: ConfigService) => { const redisUri = configService.get('REDIS_URI'); const namespace = configService.get('CACHE_NAMESPACE', 'app-cache'); - const ttl = configService.get('CACHE_TTL', 3600); + const ttl = +configService.get('CACHE_TTL', 3600); //1 hour return { stores: [ new Keyv({ - store: new CacheableMemory({ ttl: ttl*1000, lruSize: 5000 }), + store: new CacheableMemory({ ttl: ttl * 1000, lruSize: 5000 }), namespace: namespace }), new KeyvRedis(redisUri, { namespace: namespace }),