(type: string, args: string[])
| 34 | } |
| 35 | |
| 36 | async get(type: string, args: string[]): Promise<any> { |
| 37 | const key = this.generateKey(type, args); |
| 38 | const entry = this.inMemoryDb.get(key); |
| 39 | if (!entry) { |
| 40 | return null; |
| 41 | } |
| 42 | if (new Date().getTime() > entry.expiry) { |
| 43 | this.inMemoryDb.delete(key); |
| 44 | return null; |
| 45 | } |
| 46 | return entry.value; |
| 47 | } |
| 48 | |
| 49 | async evict(type: string, args: string[]): Promise<null> { |
| 50 | const key = this.generateKey(type, args); |
nothing calls this directly
no test coverage detected