Commit 1db69188 authored by JJ Kasper's avatar JJ Kasper Committed by Joe Haddad

Remove cache clearing from static-checker (#8290)

parent 08b14e49
......@@ -7,18 +7,6 @@ export default function worker(
try {
const { serverBundle, runtimeEnvConfig } = options || ({} as any)
const result = isPageStatic(serverBundle, runtimeEnvConfig)
// clear require.cache to prevent running out of memory
// since the cache is persisted by default
Object.keys(require.cache).map(modId => {
const mod = require.cache[modId]
delete require.cache[modId]
if (mod.parent) {
const idx = mod.parent.children.indexOf(mod)
mod.parent.children.splice(idx, 1)
}
})
callback(null, result)
} catch (error) {
callback(error)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment