File tree Expand file tree Collapse file tree 3 files changed +3
-1
lines changed
overrides/cdnInvalidation Expand file tree Collapse file tree 3 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -435,6 +435,7 @@ export default class Cache {
435435 await globalThis . tagCache . writeTags ( toInsert ) ;
436436
437437 // We can now invalidate all paths in the CDN
438+ // This only applies to `revalidateTag`, not to `res.revalidate()`
438439 const uniquePaths = Array . from (
439440 new Set (
440441 toInsert
Original file line number Diff line number Diff line change @@ -431,6 +431,7 @@ export function createServerResponse(
431431 ) ;
432432}
433433
434+ // This function is used only for `res.revalidate()`
434435export async function invalidateCDNOnRequest ( params : {
435436 //TODO: use the initialPath instead of rawPath, a rewrite could have happened and would make cdn invalidation fail
436437 rawPath : string ;
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export default {
1414 ? [ `${ path } ` , `${ path } ?_rsc=*` ]
1515 : [
1616 `${ path } ` ,
17- `_next/data/${ process . env . NEXT_BUILD_ID } ${ path === "/" ? "/index" : path } .json*` ,
17+ `/ _next/data/${ process . env . NEXT_BUILD_ID } ${ path === "/" ? "/index" : path } .json*` ,
1818 ] ,
1919 ) ;
2020 await cloudfront . send (
You can’t perform that action at this time.
0 commit comments