Home
/
sketchy-heroes.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
proc-gen equipment drops from monsters can be picked up
[sketchy-heroes.git]
/
lib
/
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();