summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/UserKeypairService.ts
diff options
context:
space:
mode:
authorHazel K <acomputerdog@gmail.com>2024-08-03 13:42:23 -0400
committerHazel K <acomputerdog@gmail.com>2024-08-03 13:42:23 -0400
commitbc236a4bd250fc700bdd2d5549bf9647c02cb946 (patch)
treea2f23b5ff113d2ae118c865ead5ec7cfb92b2801 /packages/backend/src/core/UserKeypairService.ts
parentencapsulate `MemoryKVCache<T>` (diff)
downloadsharkey-bc236a4bd250fc700bdd2d5549bf9647c02cb946.tar.gz
sharkey-bc236a4bd250fc700bdd2d5549bf9647c02cb946.tar.bz2
sharkey-bc236a4bd250fc700bdd2d5549bf9647c02cb946.zip
remove infinity caches
Diffstat (limited to 'packages/backend/src/core/UserKeypairService.ts')
-rw-r--r--packages/backend/src/core/UserKeypairService.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/backend/src/core/UserKeypairService.ts b/packages/backend/src/core/UserKeypairService.ts
index 51ac99179a..eb7a95da3e 100644
--- a/packages/backend/src/core/UserKeypairService.ts
+++ b/packages/backend/src/core/UserKeypairService.ts
@@ -25,7 +25,7 @@ export class UserKeypairService implements OnApplicationShutdown {
) {
this.cache = new RedisKVCache<MiUserKeypair>(this.redisClient, 'userKeypair', {
lifetime: 1000 * 60 * 60 * 24, // 24h
- memoryCacheLifetime: Infinity,
+ memoryCacheLifetime: 1000 * 60 * 60 * 12, // 12h
fetcher: (key) => this.userKeypairsRepository.findOneByOrFail({ userId: key }),
toRedisConverter: (value) => JSON.stringify(value),
fromRedisConverter: (value) => JSON.parse(value),