diff options
| author | Hazel K <acomputerdog@gmail.com> | 2024-08-03 13:42:23 -0400 |
|---|---|---|
| committer | Hazel K <acomputerdog@gmail.com> | 2024-08-03 13:42:23 -0400 |
| commit | bc236a4bd250fc700bdd2d5549bf9647c02cb946 (patch) | |
| tree | a2f23b5ff113d2ae118c865ead5ec7cfb92b2801 /packages/backend/src/core/UserKeypairService.ts | |
| parent | encapsulate `MemoryKVCache<T>` (diff) | |
| download | sharkey-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.ts | 2 |
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), |