(key: string, data: T, ttl: number = 5 * 60 * 1000)
| 18 | } |
| 19 | |
| 20 | set<T>(key: string, data: T, ttl: number = 5 * 60 * 1000): void { |
| 21 | this.cache.set(key, { |
| 22 | data, |
| 23 | timestamp: Date.now(), |
| 24 | ttl |
| 25 | }); |
| 26 | } |
| 27 | |
| 28 | get<T>(key: string): T | null { |
| 29 | const item = this.cache.get(key); |
no outgoing calls
no test coverage detected