diff options
| author | Hazel K <acomputerdog@gmail.com> | 2024-08-03 14:49:06 -0400 |
|---|---|---|
| committer | Hazel K <acomputerdog@gmail.com> | 2024-08-03 14:49:06 -0400 |
| commit | 672f1ea68476f5d325c2c996eb3020fd69e99aad (patch) | |
| tree | 9bd31faf68aa1219f3f6b4cf19e37a7c9d1f0582 /packages/backend/src/core/UserKeypairService.ts | |
| parent | implement pull-through caching (diff) | |
| download | sharkey-672f1ea68476f5d325c2c996eb3020fd69e99aad.tar.gz sharkey-672f1ea68476f5d325c2c996eb3020fd69e99aad.tar.bz2 sharkey-672f1ea68476f5d325c2c996eb3020fd69e99aad.zip | |
tune cache lifetimes
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 eb7a95da3e..92d61cd103 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: 1000 * 60 * 60 * 12, // 12h + memoryCacheLifetime: 1000 * 60 * 60, // 1h fetcher: (key) => this.userKeypairsRepository.findOneByOrFail({ userId: key }), toRedisConverter: (value) => JSON.stringify(value), fromRedisConverter: (value) => JSON.parse(value), |