(now = Date.now())
| 34 | } |
| 35 | |
| 36 | function cleanupExpiredValues(now = Date.now()): void { |
| 37 | for (const [id, entry] of inMemoryValues.entries()) { |
| 38 | if (entry.expiresAt <= now) { |
| 39 | inMemoryValues.delete(id) |
| 40 | inMemoryBytes -= entry.size |
| 41 | } |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | export function cacheLargeValue( |
| 46 | id: string, |
no test coverage detected