(
type: string,
args: string[],
value: any,
expirySeconds: number = parseInt(process.env.CACHE_EXPIRE_S || '100', 10),
)
| 21 | } |
| 22 | |
| 23 | async set( |
| 24 | type: string, |
| 25 | args: string[], |
| 26 | value: any, |
| 27 | expirySeconds: number = parseInt(process.env.CACHE_EXPIRE_S || '100', 10), |
| 28 | ): Promise<void> { |
| 29 | const key = this.generateKey(type, args); |
| 30 | this.inMemoryDb.set(key, { |
| 31 | value, |
| 32 | expiry: new Date().getTime() + expirySeconds * 1000, |
| 33 | }); |
| 34 | } |
| 35 | |
| 36 | async get(type: string, args: string[]): Promise<any> { |
| 37 | const key = this.generateKey(type, args); |
nothing calls this directly
no test coverage detected