summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/UserKeypairService.ts
diff options
context:
space:
mode:
authorHazel K <acomputerdog@gmail.com>2024-08-03 14:49:06 -0400
committerHazel K <acomputerdog@gmail.com>2024-08-03 14:49:06 -0400
commit672f1ea68476f5d325c2c996eb3020fd69e99aad (patch)
tree9bd31faf68aa1219f3f6b4cf19e37a7c9d1f0582 /packages/backend/src/core/UserKeypairService.ts
parentimplement pull-through caching (diff)
downloadsharkey-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.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 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),