fix(backend): 古いユーザーキャッシュを使うことへの対策 (misskey-dev#13453)

Co-authored-by: tamaina <tamaina@hotmail.co.jp>
This commit is contained in:
まっちゃとーにゅ 2024-02-25 04:20:12 +09:00
parent 4a615ff251
commit 552354c895
No known key found for this signature in database
GPG key ID: 6AFBBF529601C1DB
7 changed files with 27 additions and 27 deletions

View file

@ -193,6 +193,10 @@ export class RedisSingleCache<T> {
// TODO: メモリ節約のためあまり参照されないキーを定期的に削除できるようにする?
export class MemoryKVCache<T> {
/**
*
* @deprecated
*/
public cache: Map<string, { date: number; value: T; }>;
private lifetime: number;
private gcIntervalHandle: NodeJS.Timeout;
@ -207,6 +211,10 @@ export class MemoryKVCache<T> {
}
@bindThis
/**
* Mapにキャッシュをセットします
* @deprecated InternalEventなどで変更を全てのプロセス/
*/
public set(key: string, value: T): void {
this.cache.set(key, {
date: Date.now(),