core
core copied to clipboard
feat(ssr): introduce `ssrClearCompileCache`
close #7947 Allow users to clear the SSR compile cache, such as through a node-cron scheduled task, to release memory. Using lru cache might help alleviate continuous memory growth, but it cannot completely prevent the OOM issue.
Size Report
Bundles
| File | Size | Gzip | Brotli |
|---|---|---|---|
| runtime-dom.global.prod.js | 102 kB (+314 B) | 38.4 kB (+125 B) | 34.6 kB (+128 B) |
| vue.global.prod.js | 160 kB (+400 B) | 58.3 kB (+194 B) | 51.9 kB (+223 B) |
Usages
| Name | Size | Gzip | Brotli |
|---|---|---|---|
| createApp (CAPI only) | 47.1 kB (+161 B) | 18.5 kB (+60 B) | 16.9 kB (+83 B) |
| createApp | 55.7 kB (+256 B) | 21.6 kB (+120 B) | 19.7 kB (+127 B) |
| createSSRApp | 59.9 kB (+262 B) | 23.3 kB (+130 B) | 21.2 kB (+108 B) |
| defineCustomElement | 60.5 kB (+256 B) | 23.2 kB (+119 B) | 21.1 kB (+116 B) |
| overall | 69.8 kB (+272 B) | 26.7 kB (+110 B) | 24.3 kB (+147 B) |
@vue/compiler-core
npm i https://pkg.pr.new/@vue/compiler-core@12868
@vue/compiler-sfc
npm i https://pkg.pr.new/@vue/compiler-sfc@12868
@vue/compiler-dom
npm i https://pkg.pr.new/@vue/compiler-dom@12868
@vue/compiler-ssr
npm i https://pkg.pr.new/@vue/compiler-ssr@12868
@vue/runtime-core
npm i https://pkg.pr.new/@vue/runtime-core@12868
@vue/runtime-dom
npm i https://pkg.pr.new/@vue/runtime-dom@12868
@vue/reactivity
npm i https://pkg.pr.new/@vue/reactivity@12868
@vue/server-renderer
npm i https://pkg.pr.new/@vue/server-renderer@12868
@vue/shared
npm i https://pkg.pr.new/@vue/shared@12868
vue
npm i https://pkg.pr.new/vue@12868
@vue/compat
npm i https://pkg.pr.new/@vue/compat@12868
commit: 5177f16
Probably not needed, SSR needs it because the compileCache is retained in the server process.