Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

compileCache.ts

9 lines342 Bytes

1import * as NodeModule from "node:module";
2import * as Effect from "effect/Effect";
3​
4// Windows force-kills on quit; persist the cache after startup.
5export const flushCompileCache = Effect.try(() => {
6 if (!Reflect.get(globalThis, Symbol.for("t3code.preparedServerCache"))) {
7 NodeModule.flushCompileCache();
8 }
9}).pipe(Effect.ignore);