()
| 11 | private constructor() {} |
| 12 | |
| 13 | static getInstance(): Cache { |
| 14 | if (!Cache.instance) { |
| 15 | Cache.instance = new Cache(); |
| 16 | } |
| 17 | return Cache.instance; |
| 18 | } |
| 19 | |
| 20 | set<T>(key: string, data: T, ttl: number = 5 * 60 * 1000): void { |
| 21 | this.cache.set(key, { |