()
| 218 | |
| 219 | // Expensive function that we want to cache |
| 220 | const expensiveFunction = async (): Promise<{ result: string; timestamp: number; execution: number }> => { |
| 221 | executionCount++; |
| 222 | // Simulate expensive operation |
| 223 | await delay(10); |
| 224 | return { |
| 225 | result: "expensive computation result", |
| 226 | timestamp: Date.now(), |
| 227 | execution: executionCount, |
| 228 | }; |
| 229 | }; |
| 230 | |
| 231 | // Clear any existing cache for this key |
| 232 | await cacheService.del([key]); |
no test coverage detected