diff options
| author | Hazel K <acomputerdog@gmail.com> | 2024-08-18 00:34:01 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-18 13:34:01 +0900 |
| commit | 9ce44b24b8837b846e3170c70da13f8d0f86d581 (patch) | |
| tree | f463bdf7435c9881160c59d4e1ec034dd034c033 /packages/backend/src/server/api | |
| parent | Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop (diff) | |
| download | sharkey-9ce44b24b8837b846e3170c70da13f8d0f86d581.tar.gz sharkey-9ce44b24b8837b846e3170c70da13f8d0f86d581.tar.bz2 sharkey-9ce44b24b8837b846e3170c70da13f8d0f86d581.zip | |
fix(backend): memory leak in memory caches (#14363)
* encapsulate `MemoryKVCache<T>`
* remove infinity caches
* encapsulate other caches
* add missing awaits to internally synchronize caches
* implement pull-through caching
* tune cache lifetimes
* optimize cache GC by stopping early
* summarize changes in CHANGELOG.md
* Fix timeout comments
Co-authored-by: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>
* add comments about awaiting the redis write
---------
Co-authored-by: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>
Diffstat (limited to 'packages/backend/src/server/api')
| -rw-r--r-- | packages/backend/src/server/api/AuthenticateService.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/backend/src/server/api/AuthenticateService.ts b/packages/backend/src/server/api/AuthenticateService.ts index ddef8db987..690ff2e022 100644 --- a/packages/backend/src/server/api/AuthenticateService.ts +++ b/packages/backend/src/server/api/AuthenticateService.ts @@ -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 |