(pluginCache: PluginCache, onUse: () => void)
| 26 | } |
| 27 | |
| 28 | export function getTrackedPluginCache(pluginCache: PluginCache, onUse: () => void): PluginCache { |
| 29 | return { |
| 30 | delete(id: string) { |
| 31 | onUse(); |
| 32 | return pluginCache.delete(id); |
| 33 | }, |
| 34 | get(id: string) { |
| 35 | onUse(); |
| 36 | return pluginCache.get(id); |
| 37 | }, |
| 38 | has(id: string) { |
| 39 | onUse(); |
| 40 | return pluginCache.has(id); |
| 41 | }, |
| 42 | set(id: string, value: any) { |
| 43 | onUse(); |
| 44 | return pluginCache.set(id, value); |
| 45 | } |
| 46 | }; |
| 47 | } |
| 48 | |
| 49 | export const NO_CACHE: PluginCache = { |
| 50 | delete() { |
no outgoing calls
no test coverage detected
searching dependent graphs…