Home
/
sketchy-heroes.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
37e7855fe751d106d9998a1e18091d8bf083922b
[sketchy-heroes.git]
/
cache.ts
1
export class Cache {
2
items: Record<string, any>;
3
constructor() {
4
this.items = {};
5
}
6
7
async put(key: string, item: any) {
8
this.items[key] = item;
9
}
10
11
async get<T>(key: string): Promise<T> {
12
return this.items[key] as T;
13
}
14
}
15
16
17
export const cache = new Cache();