From 13e0a64a7744d369983e6ec0ee8a56075945e95f Mon Sep 17 00:00:00 2001 From: tamaina Date: Tue, 27 Feb 2024 01:57:35 +0000 Subject: [PATCH] set publicKeyCache lifetime --- packages/backend/src/core/activitypub/ApDbResolverService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/core/activitypub/ApDbResolverService.ts b/packages/backend/src/core/activitypub/ApDbResolverService.ts index 0cb3b78941..273572e0da 100644 --- a/packages/backend/src/core/activitypub/ApDbResolverService.ts +++ b/packages/backend/src/core/activitypub/ApDbResolverService.ts @@ -54,8 +54,8 @@ export class ApDbResolverService implements OnApplicationShutdown { private cacheService: CacheService, private apPersonService: ApPersonService, ) { - this.publicKeyCache = new MemoryKVCache(Infinity); - this.publicKeyByUserIdCache = new MemoryKVCache(Infinity); + this.publicKeyCache = new MemoryKVCache(1e3 * 60 * 20); // 20分 + this.publicKeyByUserIdCache = new MemoryKVCache(1e3 * 60 * 20); // 20分 } @bindThis