()
| 593 | * Clear all policy limits (session, persistent, and stop polling) |
| 594 | */ |
| 595 | export async function clearPolicyLimitsCache(): Promise<void> { |
| 596 | stopBackgroundPolling() |
| 597 | |
| 598 | sessionCache = null |
| 599 | |
| 600 | loadingCompletePromise = null |
| 601 | loadingCompleteResolve = null |
| 602 | |
| 603 | try { |
| 604 | await unlink(getCachePath()) |
| 605 | } catch { |
| 606 | // Ignore errors (including ENOENT when file doesn't exist) |
| 607 | } |
| 608 | } |
| 609 | |
| 610 | /** |
| 611 | * Background polling callback |
no test coverage detected