MCPcopy
hub / github.com/vitejs/vite / clearCache

Method clearCache

packages/vite/src/module-runner/runner.ts:98–101  ·  view source on GitHub ↗

* Clear all caches including HMR listeners.

()

Source from the content-addressed store, hash-verified

96 * Clear all caches including HMR listeners.
97 */
98 public clearCache(): void {
99 this.evaluatedModules.clear()
100 this.hmrClient?.clear()
101 }
102
103 /**
104 * Clears all caches, removes all HMR listeners, and resets source map support.

Callers 3

closeMethod · 0.95
importWithRetryFunction · 0.80
setupModuleRunnerFunction · 0.80

Calls 1

clearMethod · 0.45

Tested by 1

setupModuleRunnerFunction · 0.64