MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / clearPluginCache

Function clearPluginCache

source code/utils/plugins/pluginLoader.ts:3227–3245  ·  view source on GitHub ↗
(reason?: string)

Source from the content-addressed store, hash-verified

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