(chatId: number, mode: string, day: number, data: CacheData)
| 72 | cache.set(key, { data, timestamp: Date.now() }); |
| 73 | trimCache(); |
| 74 | } |
| 75 | |
| 76 | async function ensureDirectories(): Promise<void> { |
| 77 | try { |
| 78 | if (!fs.existsSync(CACHE_DIR)) { |
| 79 | fs.mkdirSync(CACHE_DIR, { recursive: true }); |
| 80 | } |
| 81 | } catch (error) { |
no test coverage detected