next.js
8daa66b6 - Add test to verify that inner caches are excluded from Resume Data Cache (#75883)

Commit
347 days ago
Add test to verify that inner caches are excluded from Resume Data Cache (#75883) The Resume Data Cache (RDC) is used to provide cache consistency when resuming a partial prerendered static shell. When reading from this cache, it is not possible for there to be a miss because, regardless of the cache age, we always consume the cache entries on resume because they are temporarily bound to the static shell being served for this particular request. Since the cache entry can never miss, there is no need to store inner cache entries in the Resume Data Cache because the only time you would encounter an inner entry is if the outer entry had to revalidate. We have already optimized the Resume Data Cache by excluding writing to it during prerendering (and dev warmup rendering) if we're already inside a cache scope. We also handle that you can have an inner cache entry fill the backing cache and omit the RDC entry, and then later we encounter that same cache entry in the prerender scope, and even though we don't need to produce a new cache entry (it was already cached in the backing cache implementation), we do still write it to the Resume Data Cache. The test added in this PR verifies this behavior and ensures that we don't regress in the future. closes NAR-54
Author
Parents
Loading