diff --git a/packages/backend/src/misc/cache.ts b/packages/backend/src/misc/cache.ts index b0d6fe049ed5..2c8b5cb4c1b5 100644 --- a/packages/backend/src/misc/cache.ts +++ b/packages/backend/src/misc/cache.ts @@ -149,7 +149,9 @@ export class RedisSingleCache { const cached = await this.redisClient.get(`singlecache:${this.name}`); if (cached == null) return undefined; - return this.fromRedisConverter(cached); + const parsed = this.fromRedisConverter(cached); + this.memoryCache.set(parsed); + return parsed; } @bindThis @@ -166,7 +168,6 @@ export class RedisSingleCache { const cachedValue = await this.get(); if (cachedValue !== undefined) { // Cache HIT - this.memoryCache.set(cachedValue); return cachedValue; }