MCPcopy Create free account
hub / github.com/PalisadoesFoundation/talawa-api / clearPluginModuleCache

Function clearPluginModuleCache

src/plugin/utils.ts:623–644  ·  view source on GitHub ↗
(
	pluginPath: string,
	_cacheObj?: Record<string, unknown>,
)

Source from the content-addressed store, hash-verified

621 * This function is kept for compatibility but does not perform cache clearing in ES modules
622 */
623export function clearPluginModuleCache(
624 pluginPath: string,
625 _cacheObj?: Record<string, unknown>,
626): void {
627 try {
628 // In ES modules, we cannot access the module cache directly
629 // The module cache is managed by the ES module loader and is not exposed
630 // This function is kept for compatibility but does not perform cache clearing
631 // The garbage collector will handle cleanup of unused modules automatically
632
633 // Log that cache clearing is not available in ES modules
634 rootLogger.info({
635 msg: "Module cache clearing not available in ES modules",
636 pluginPath,
637 });
638
639 // Non-critical operation, continue with cleanup
640 } catch (error) {
641 rootLogger.warn({ msg: "Failed to clear module cache", err: error });
642 // Non-critical error, continue with cleanup
643 }
644}

Callers 1

removePluginDirectoryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected