fix(backend): memory leak in memory caches (#14363)

cherry picked from commit bf8c42eecd3d645652ddd7e69b727ced2a15457d

Co-authored-by: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>
Co-authored-by: Hazel K <acomputerdog@gmail.com>
This commit is contained in:
Hazel K 2024-08-18 00:34:01 -04:00 committed by あわわわとーにゅ
parent 6d4dc5ea20
commit 9e998cc10b
No known key found for this signature in database
GPG key ID: 6AFBBF529601C1DB
11 changed files with 99 additions and 86 deletions

View file

@ -37,7 +37,7 @@ export class AuthenticateService implements OnApplicationShutdown {
private cacheService: CacheService,
) {
this.appCache = new MemoryKVCache<MiApp>(Infinity);
this.appCache = new MemoryKVCache<MiApp>(1000 * 60 * 60 * 24 * 7); // 1w
}
@bindThis