()
| 20 | const MAX_MODELS_CACHE_ENTRIES = 32; |
| 21 | |
| 22 | function getModelsCacheState(): ModelsCacheState { |
| 23 | if (!globalThis.__piModelsCacheState) { |
| 24 | globalThis.__piModelsCacheState = { |
| 25 | entries: new Map(), |
| 26 | inFlight: new Map(), |
| 27 | generation: 0, |
| 28 | }; |
| 29 | } |
| 30 | return globalThis.__piModelsCacheState; |
| 31 | } |
| 32 | |
| 33 | export function invalidateModelsCache(): void { |
| 34 | const state = getModelsCacheState(); |
no outgoing calls
no test coverage detected