fix: 古いキャッシュを使うのを修正 (#13453)

This commit is contained in:
tamaina 2024-02-25 12:36:10 +09:00 committed by GitHub
parent 792168fdfa
commit 2c6f25b710
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 28 additions and 28 deletions

View file

@ -187,6 +187,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;
@ -201,6 +205,10 @@ export class MemoryKVCache<T> {
}
@bindThis
/**
* Mapにキャッシュをセットします
* @deprecated InternalEventなどで変更を全てのプロセス/
*/
public set(key: string, value: T): void {
this.cache.set(key, {
date: Date.now(),