Next.js

Cache Revolution and Font Fixes

The Next.js team shipped a massive caching overhaul with an LRU cache system for better performance during parallel revalidation, plus critical font preloading fixes for MDX pages. Major Turbopack improvements focused on data storage optimization and selective read performance, while deployment ID handling got more robust validation.

Duration: PT3M57S

https://podlog.io/listen/next-js-36fde2ae/episode/cache-revolution-and-font-fixes-9987a459

Transcript

Hey there, fellow developers! Welcome back to your daily dose of Next.js goodness. I'm here with your coffee and code update for January 23rd, 2026. And wow, do we have some exciting changes to dive into today!

Let me start with the absolute star of today's show - and this one's a real game-changer. Wyatt Johnson just landed a massive improvement to how Next.js handles caching in minimal mode. We're talking about a complete overhaul from a single-entry cache to a full LRU cache system with compound keys.

Here's why this matters: imagine you're running ISR revalidation and multiple requests hit the same pathname simultaneously. Before this change, each request would basically step on the others' toes, overwriting cache entries and causing unnecessary work. Now, with compound keys that include both the pathname and invocation ID, each request gets its own cache space. It's like giving everyone their own lane on the highway instead of making them fight for one lane!

The technical elegance here is beautiful - cache keys now look like `/blog/post-1` plus an invocation ID, and there's even a TTL fallback system for when you don't have that header. Plus, you can tune it with environment variables like `NEXT_PRIVATE_RESPONSE_CACHE_MAX_SIZE`. This is the kind of infrastructure work that makes everything else just... work better.

Speaking of things working better, Tim Neutkens fixed a sneaky font preloading issue that was affecting MDX pages in Turbopack. You know how frustrating it is when fonts don't load properly? Well, turns out MDX files were getting transformed from `page.mdx` to `page.mdx.tsx` internally, but the font manifest was looking for the original path. Classic path mismatch! Now your MDX pages will get their fonts preloaded just like they should.

The deployment ID saga continues too, with Brooke adding automatic deployment ID generation with proper validation. No more worrying about invalid characters or strings that are too long - the system now handles this gracefully with helpful error messages. It's those little touches that make the developer experience so much smoother.

Now let's talk about the Turbopack improvements, because there's some serious engineering happening under the hood. Tobias has been on a refactoring spree, removing the reverse task cache and optimizing data storage. I know, I know, it sounds super technical, but this stuff directly translates to faster build times and better memory usage. He also improved selective read support and added better caching during module resolution.

One thing I love seeing is attention to the developer experience details. Jiachi added hydration diff indicators that clearly show which lines come from the client versus the server. If you've ever stared at a hydration error wondering "wait, which is which?", you'll appreciate the clear "Client" and "Server" labels now.

The documentation got some love too, with a whole backport of updates for version 16.1.5, including expanded sections on fonts and package bundling. Sometimes the best features are the ones that help you understand how to use all the other great features!

Today's Focus: If you're working on applications with heavy caching needs or ISR, definitely check out those new LRU cache environment variables. And if you're using MDX with custom fonts, this might be a great time to upgrade and see those preloading improvements in action.

The Next.js team continues to prove that the best framework improvements are often the ones you don't see directly - the infrastructure that makes everything else possible. From caching algorithms to build optimizations, they're constantly making your development life easier.

That's a wrap on today's updates! Keep building amazing things, and I'll catch you tomorrow with more Next.js news. Happy coding!