MCPcopy Index your code
hub / github.com/codeaashu/claude-code / clearPluginCache

Function clearPluginCache

src/utils/plugins/pluginLoader.ts:3225–3243  ·  view source on GitHub ↗
(reason?: string)

Source from the content-addressed store, hash-verified

3223 * - When debugging plugin loading issues
3224 */
3225export function clearPluginCache(reason?: string): void {
3226 if (reason) {
3227 logForDebugging(
3228 `clearPluginCache: invalidating loadAllPlugins cache (${reason})`,
3229 )
3230 }
3231 loadAllPlugins.cache?.clear?.()
3232 loadAllPluginsCacheOnly.cache?.clear?.()
3233 // If a plugin previously contributed settings, the session settings cache
3234 // holds a merged result that includes them. cachePluginSettings() on reload
3235 // won't bust the cache when the new base is empty (the startup perf win),
3236 // so bust it here to drop stale plugin overrides. When the base is already
3237 // undefined (startup, or no prior plugin settings) this is a no-op.
3238 if (getPluginSettingsBase() !== undefined) {
3239 resetSettingsCache()
3240 }
3241 clearPluginSettingsBase()
3242 // TODO: Clear installed plugins cache when installedPluginsManager is implemented
3243}
3244
3245/**
3246 * Merge settings from all enabled plugins into a single record.

Callers 6

runFunction · 0.85
performStartupChecksFunction · 0.85
clearAllPluginCachesFunction · 0.85
setupPluginHookHotReloadFunction · 0.85

Calls 5

logForDebuggingFunction · 0.85
getPluginSettingsBaseFunction · 0.85
resetSettingsCacheFunction · 0.85
clearPluginSettingsBaseFunction · 0.85
clearMethod · 0.45

Tested by

no test coverage detected