Include deployment id in cacheHandlers keys#93453
Conversation
Tests PassedCommit: c3228ce |
unstubbable
left a comment
There was a problem hiding this comment.
How was this ever working for dev? In that case,
buildId = "development"and so it always uses the same cache key
In dev we also have the hmrRefreshHash as part of the cache key.
| let key1 = await execute('value-1') | ||
| let key2 = await execute('value-2') | ||
| // Second run should not use the same key | ||
| expect(key1).not.toBe(key2) |
There was a problem hiding this comment.
This assertion doesn't work in dev.
There was a problem hiding this comment.
It indeed fails because it reuses the cache. But is that intended behavior? What happens if you use a remote cache in dev?
There was a problem hiding this comment.
'use cache: remote' doesn't have that problem because it also only uses the in-memory one with next dev (or next start). But a custom remote cache handler would indeed have the problem with Turbopack, because the hmrRefreshHash is just an incrementing number there and not a real hash. I guess another reason we need the implementation hash.
There was a problem hiding this comment.
So I'll just move this to test/production for now?
There was a problem hiding this comment.
yeah, sounds good to me
Stats from current PR🟢 2 improvements
📊 All Metrics📖 Metrics GlossaryDev Server Metrics:
Build Metrics:
Change Thresholds:
⚡ Dev Server
📦 Dev Server (Webpack) (Legacy)📦 Dev Server (Webpack)
⚡ Production Builds
📦 Production Builds (Webpack) (Legacy)📦 Production Builds (Webpack)
📦 Bundle SizesBundle Sizes⚡ TurbopackClient Main Bundles
Server Middleware
Build DetailsBuild Manifests
📦 WebpackClient Main Bundles
Polyfills
Pages
Server Edge SSR
Middleware
Build DetailsBuild Manifests
Build Cache
🔄 Shared (bundler-independent)Runtimes
📝 Changed Files (16 files)Files with changes:
View diffsapp-page-exp..ntime.dev.jsfailed to diffapp-page-exp..time.prod.jsDiff too large to display app-page-tur..ntime.dev.jsfailed to diffapp-page-tur..time.prod.jsfailed to diffapp-page-tur..ntime.dev.jsfailed to diffapp-page-tur..time.prod.jsfailed to diffapp-page.runtime.dev.jsfailed to diffapp-page.runtime.prod.jsDiff too large to display app-route-ex..ntime.dev.jsDiff too large to display app-route-ex..time.prod.jsDiff too large to display app-route-tu..ntime.dev.jsDiff too large to display app-route-tu..time.prod.jsDiff too large to display app-route-tu..ntime.dev.jsDiff too large to display app-route-tu..time.prod.jsDiff too large to display app-route.runtime.dev.jsDiff too large to display app-route.ru..time.prod.jsDiff too large to display 📎 Tarball URLCommit: c3228ce |
Backport #93453 to 16.2 How was this ever working for dev? In that case, `buildId = "development"` and so it always uses the same cache key Co-authored-by: Niklas Mischkulnig <4586894+mischnic@users.noreply.github.com>

How was this ever working for dev? In that case,
buildId = "development"and so it always uses the same cache key