Setup: redis sentinel in kubernetes cluster
Versions where i experienced the bug:
"@fortedigital/nextjs-cache-handler": "3.2.2",
"next": "16.3.0",
"redis": "6.2.0",
Root Cause:
In Next.js 16.3.0, /_tree segment prefetches require the TreePrefetch format (compact route tree structure). When segmentData is missing from the cache entry, the server falls back to returning the full rscData (InitialRSCPayload). The browser in 16.3.0 (no x-nextjs-postponed: 2) calls writeDynamicTreeResponseIntoCache expecting TreePrefetch format — fails to parse the full RSC — rejects the cache entry with a retry — loops forever.
This PR fixes it:
#237
Setup: redis sentinel in kubernetes cluster
Versions where i experienced the bug:
"@fortedigital/nextjs-cache-handler": "3.2.2",
"next": "16.3.0",
"redis": "6.2.0",
Root Cause:
In Next.js 16.3.0, /_tree segment prefetches require the TreePrefetch format (compact route tree structure). When segmentData is missing from the cache entry, the server falls back to returning the full rscData (InitialRSCPayload). The browser in 16.3.0 (no x-nextjs-postponed: 2) calls writeDynamicTreeResponseIntoCache expecting TreePrefetch format — fails to parse the full RSC — rejects the cache entry with a retry — loops forever.
This PR fixes it:
#237