MCPcopy
hub / github.com/claude-code-best/claude-code / clearAllPluginCaches

Function clearAllPluginCaches

src/utils/plugins/cacheUtils.ts:26–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24const CLEANUP_AGE_MS = 7 * 24 * 60 * 60 * 1000 // 7 days
25
26export function clearAllPluginCaches(): void {
27 clearPluginCache()
28 clearPluginCommandCache()
29 clearPluginAgentCache()
30 clearPluginHookCache()
31 // Prune hooks from plugins no longer in the enabled set so uninstalled/
32 // disabled plugins stop firing immediately (gh-36995). Prune-only: hooks
33 // from newly-enabled plugins are NOT added here — they wait for
34 // /reload-plugins like commands/agents/MCP do. Fire-and-forget: old hooks
35 // stay valid until the prune completes (preserves gh-29767). No-op when
36 // STATE.registeredHooks is empty (test/preload.ts beforeEach clears it via
37 // resetStateForTests before reaching here).
38 pruneRemovedPluginHooks().catch(e => logError(e))
39 clearPluginOptionsCache()
40 clearPluginOutputStyleCache()
41 clearAllOutputStylesCache()
42}
43
44export function clearAllCaches(): void {
45 clearAllPluginCaches()

Callers 1

clearAllCachesFunction · 0.85

Calls 9

clearPluginCacheFunction · 0.85
clearPluginCommandCacheFunction · 0.85
clearPluginAgentCacheFunction · 0.85
clearPluginHookCacheFunction · 0.85
pruneRemovedPluginHooksFunction · 0.85
clearPluginOptionsCacheFunction · 0.85
logErrorFunction · 0.50

Tested by

no test coverage detected