Delete a cache entry and clear its timers
(url: string)
| 713 | |
| 714 | /** Delete a cache entry and clear its timers */ |
| 715 | function deleteCacheEntry(url: string): void { |
| 716 | const entry = cache.get(url); |
| 717 | if (entry) { |
| 718 | clearTimeout(entry.inactivityTimer); |
| 719 | clearTimeout(entry.maxLifetimeTimer); |
| 720 | totalBytes -= entry.data.length; |
| 721 | cache.delete(url); |
| 722 | } |
| 723 | } |
| 724 | |
| 725 | /** Get cached data and refresh the inactivity timer */ |
| 726 | function getCacheEntry(url: string): Uint8Array | undefined { |
no outgoing calls
no test coverage detected
searching dependent graphs…