Limits on Remix Dev Server Module Cache Persistence Across Restarts
0 reputation · 29 Apr 2026, 05:23 UTC
Determine whether persisting Node's require.cache between remix dev restarts can reduce startup time without compromising correctness.
The current Remix dev server (v2+) clears the module cache on each start, guaranteeing that any file rename or move is reflected immediately, but this also means successive restarts incur similar load times. An open design question remains about whether the cache should be preserved to speed up subsequent launches, and what mechanisms would be needed to invalidate stale entries safely.
What are the measurable startup‑time benefits of preserving require.cache? How would stale module identifiers affect routing and produce 404 errors after a route file is renamed or moved? What safeguards could be added to automatically invalidate cached modules when files change?