diff options
| author | dakkar <dakkar@thenautilus.net> | 2024-08-06 16:51:18 +0000 |
|---|---|---|
| committer | dakkar <dakkar@thenautilus.net> | 2024-08-06 16:51:18 +0000 |
| commit | 4e7df7a5f21f91d49318840600fe329cae05c919 (patch) | |
| tree | 701cdaa4a1ae06412d86fc98529aa45ae26ae190 /packages/backend/src/core/UserKeypairService.ts | |
| parent | merge: Add icon for moving files/folders - for !583 (!586) (diff) | |
| parent | Fix timeout comments (diff) | |
| download | sharkey-4e7df7a5f21f91d49318840600fe329cae05c919.tar.gz sharkey-4e7df7a5f21f91d49318840600fe329cae05c919.tar.bz2 sharkey-4e7df7a5f21f91d49318840600fe329cae05c919.zip | |
merge: Remove infinite caches to prevent memory leak (!587)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/587
Closes #600 and #601
Approved-by: Amelia Yukii <amelia.yukii@shourai.de>
Approved-by: Marie <marie@kaifa.ch>
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..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: Infinity, + memoryCacheLifetime: 1000 * 60 * 60, // 1h fetcher: (key) => this.userKeypairsRepository.findOneByOrFail({ userId: key }), toRedisConverter: (value) => JSON.stringify(value), fromRedisConverter: (value) => JSON.parse(value), |