perf(server): cache blocking
This commit is contained in:
parent
b7522f69e7
commit
0c12e80106
8 changed files with 99 additions and 65 deletions
|
|
@ -1,5 +1,7 @@
|
|||
import { bindThis } from '@/decorators.js';
|
||||
|
||||
// TODO: メモリ節約のためあまり参照されないキーを定期的に削除できるようにする?
|
||||
|
||||
export class Cache<T> {
|
||||
public cache: Map<string | null, { date: number; value: T; }>;
|
||||
private lifetime: number;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue