MCPcopy
hub / github.com/vercel/hyper / clearCache

Function clearCache

app/plugins.ts:160–174  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

158}
159
160function clearCache() {
161 // trigger unload hooks
162 modules.forEach((mod) => {
163 if (mod.onUnload) {
164 mod.onUnload(app);
165 }
166 });
167
168 // clear require cache
169 for (const entry in require.cache) {
170 if (entry.indexOf(path) === 0 || entry.indexOf(localPath) === 0) {
171 delete require.cache[entry];
172 }
173 }
174}
175
176export {updatePlugins};
177

Callers 1

updatePluginsFunction · 0.85

Calls 2

indexOfMethod · 0.80
forEachMethod · 0.45

Tested by

no test coverage detected