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