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

Function cachePluginSettings

src/utils/plugins/pluginLoader.ts:3281–3295  ·  view source on GitHub ↗
(plugins: LoadedPlugin[])

Source from the content-addressed store, hash-verified

3279 * Called after loadAllPlugins resolves.
3280 */
3281export function cachePluginSettings(plugins: LoadedPlugin[]): void {
3282 const settings = mergePluginSettings(plugins)
3283 setPluginSettingsBase(settings)
3284 // Only bust the session settings cache if there are actually plugin settings
3285 // to merge. In the common case (no plugins, or plugins without settings) the
3286 // base layer is empty and loadSettingsFromDisk would produce the same result
3287 // anyway — resetting here would waste ~17ms on startup re-reading and
3288 // re-validating every settings file on the next getSettingsWithErrors() call.
3289 if (settings && Object.keys(settings).length > 0) {
3290 resetSettingsCache()
3291 logForDebugging(
3292 `Cached plugin settings with keys: ${Object.keys(settings).join(', ')}`,
3293 )
3294 }
3295}
3296
3297/**
3298 * Type predicate: check if a value is a non-null, non-array object (i.e., a record).

Callers 1

assemblePluginLoadResultFunction · 0.85

Calls 5

mergePluginSettingsFunction · 0.85
setPluginSettingsBaseFunction · 0.85
resetSettingsCacheFunction · 0.85
logForDebuggingFunction · 0.85
keysMethod · 0.80

Tested by

no test coverage detected