@@ -111,7 +111,7 @@ test.describe('Simple Page Router (no basePath, no i18n)', () => {
111
111
expect ( headers1 [ 'x-nextjs-cache' ] ) . toBeUndefined ( )
112
112
expect ( headers1 [ 'netlify-cache-tag' ] ) . toBe ( `_n_t_${ pagePath } ` )
113
113
expect ( headers1 [ 'netlify-cdn-cache-control' ] ) . toBe (
114
- 's-maxage=31536000, stale-while-revalidate=31536000' ,
114
+ 's-maxage=31536000, stale-while-revalidate=31536000, durable ' ,
115
115
)
116
116
117
117
const date1 = await page . textContent ( '[data-testid="date-now"]' )
@@ -139,7 +139,7 @@ test.describe('Simple Page Router (no basePath, no i18n)', () => {
139
139
expect ( headers1Json [ 'x-nextjs-cache' ] ) . toBeUndefined ( )
140
140
expect ( headers1Json [ 'netlify-cache-tag' ] ) . toBe ( `_n_t_${ pagePath } ` )
141
141
expect ( headers1Json [ 'netlify-cdn-cache-control' ] ) . toBe (
142
- 's-maxage=31536000, stale-while-revalidate=31536000' ,
142
+ 's-maxage=31536000, stale-while-revalidate=31536000, durable ' ,
143
143
)
144
144
const data1 = ( await response1Json ?. json ( ) ) || { }
145
145
expect ( data1 ?. pageProps ?. time ) . toBe ( date1 )
@@ -164,7 +164,7 @@ test.describe('Simple Page Router (no basePath, no i18n)', () => {
164
164
expect ( headers2 [ 'cache-status' ] ) . toMatch ( / " N e x t .j s " ; h i t / m)
165
165
}
166
166
expect ( headers2 [ 'netlify-cdn-cache-control' ] ) . toBe (
167
- 's-maxage=31536000, stale-while-revalidate=31536000' ,
167
+ 's-maxage=31536000, stale-while-revalidate=31536000, durable ' ,
168
168
)
169
169
170
170
// the page is cached
@@ -195,7 +195,7 @@ test.describe('Simple Page Router (no basePath, no i18n)', () => {
195
195
expect ( headers2Json [ 'cache-status' ] ) . toMatch ( / " N e x t .j s " ; h i t / m)
196
196
}
197
197
expect ( headers2Json [ 'netlify-cdn-cache-control' ] ) . toBe (
198
- 's-maxage=31536000, stale-while-revalidate=31536000' ,
198
+ 's-maxage=31536000, stale-while-revalidate=31536000, durable ' ,
199
199
)
200
200
201
201
const data2 = ( await response2Json ?. json ( ) ) || { }
@@ -250,7 +250,7 @@ test.describe('Simple Page Router (no basePath, no i18n)', () => {
250
250
expect ( response3Json ?. status ( ) ) . toBe ( 200 )
251
251
expect ( headers3Json [ 'x-nextjs-cache' ] ) . toBeUndefined ( )
252
252
expect ( headers3Json [ 'netlify-cdn-cache-control' ] ) . toBe (
253
- 's-maxage=31536000, stale-while-revalidate=31536000' ,
253
+ 's-maxage=31536000, stale-while-revalidate=31536000, durable ' ,
254
254
)
255
255
256
256
const data3 = ( await response3Json ?. json ( ) ) || { }
@@ -341,7 +341,7 @@ test.describe('Simple Page Router (no basePath, no i18n)', () => {
341
341
expect ( await page . textContent ( 'h1' ) ) . toBe ( '404' )
342
342
343
343
expect ( headers [ 'netlify-cdn-cache-control' ] ) . toBe (
344
- 'no-cache, no-store, max-age=0, must-revalidate' ,
344
+ 'no-cache, no-store, max-age=0, must-revalidate, durable ' ,
345
345
)
346
346
expect ( headers [ 'cache-control' ] ) . toBe ( 'no-cache,no-store,max-age=0,must-revalidate' )
347
347
} )
@@ -357,7 +357,7 @@ test.describe('Simple Page Router (no basePath, no i18n)', () => {
357
357
expect ( await page . textContent ( 'h1' ) ) . toBe ( '404' )
358
358
359
359
expect ( headers [ 'netlify-cdn-cache-control' ] ) . toBe (
360
- 's-maxage=31536000, stale-while-revalidate=31536000' ,
360
+ 's-maxage=31536000, stale-while-revalidate=31536000, durable ' ,
361
361
)
362
362
expect ( headers [ 'cache-control' ] ) . toBe ( 'public,max-age=0,must-revalidate' )
363
363
} )
@@ -401,7 +401,7 @@ test.describe('Simple Page Router (no basePath, no i18n)', () => {
401
401
const response = await page . goto ( new URL ( 'static/fully-static' , pageRouter . url ) . href )
402
402
const headers = response ?. headers ( ) || { }
403
403
404
- expect ( headers [ 'netlify-cdn-cache-control' ] ) . toBe ( 'max-age=31536000' )
404
+ expect ( headers [ 'netlify-cdn-cache-control' ] ) . toBe ( 'max-age=31536000, durable ' )
405
405
expect ( headers [ 'cache-control' ] ) . toBe ( 'public,max-age=0,must-revalidate' )
406
406
} )
407
407
@@ -487,7 +487,7 @@ test.describe('Page Router with basePath and i18n', () => {
487
487
expect ( headers1ImplicitLocale [ 'x-nextjs-cache' ] ) . toBeUndefined ( )
488
488
expect ( headers1ImplicitLocale [ 'netlify-cache-tag' ] ) . toBe ( `_n_t_/en${ pagePath } ` )
489
489
expect ( headers1ImplicitLocale [ 'netlify-cdn-cache-control' ] ) . toBe (
490
- 's-maxage=31536000, stale-while-revalidate=31536000' ,
490
+ 's-maxage=31536000, stale-while-revalidate=31536000, durable ' ,
491
491
)
492
492
493
493
const date1ImplicitLocale = await page . textContent ( '[data-testid="date-now"]' )
@@ -513,7 +513,7 @@ test.describe('Page Router with basePath and i18n', () => {
513
513
expect ( headers1ExplicitLocale [ 'x-nextjs-cache' ] ) . toBeUndefined ( )
514
514
expect ( headers1ExplicitLocale [ 'netlify-cache-tag' ] ) . toBe ( `_n_t_/en${ pagePath } ` )
515
515
expect ( headers1ExplicitLocale [ 'netlify-cdn-cache-control' ] ) . toBe (
516
- 's-maxage=31536000, stale-while-revalidate=31536000' ,
516
+ 's-maxage=31536000, stale-while-revalidate=31536000, durable ' ,
517
517
)
518
518
519
519
const date1ExplicitLocale = await page . textContent ( '[data-testid="date-now"]' )
@@ -545,7 +545,7 @@ test.describe('Page Router with basePath and i18n', () => {
545
545
expect ( headers1Json [ 'x-nextjs-cache' ] ) . toBeUndefined ( )
546
546
expect ( headers1Json [ 'netlify-cache-tag' ] ) . toBe ( `_n_t_/en${ pagePath } ` )
547
547
expect ( headers1Json [ 'netlify-cdn-cache-control' ] ) . toBe (
548
- 's-maxage=31536000, stale-while-revalidate=31536000' ,
548
+ 's-maxage=31536000, stale-while-revalidate=31536000, durable ' ,
549
549
)
550
550
const data1 = ( await response1Json ?. json ( ) ) || { }
551
551
expect ( data1 ?. pageProps ?. time ) . toBe ( date1ImplicitLocale )
@@ -573,7 +573,7 @@ test.describe('Page Router with basePath and i18n', () => {
573
573
expect ( headers2ImplicitLocale [ 'cache-status' ] ) . toMatch ( / " N e x t .j s " ; h i t / m)
574
574
}
575
575
expect ( headers2ImplicitLocale [ 'netlify-cdn-cache-control' ] ) . toBe (
576
- 's-maxage=31536000, stale-while-revalidate=31536000' ,
576
+ 's-maxage=31536000, stale-while-revalidate=31536000, durable ' ,
577
577
)
578
578
579
579
// the page is cached
@@ -603,7 +603,7 @@ test.describe('Page Router with basePath and i18n', () => {
603
603
expect ( headers2ExplicitLocale [ 'cache-status' ] ) . toMatch ( / " N e x t .j s " ; h i t / m)
604
604
}
605
605
expect ( headers2ExplicitLocale [ 'netlify-cdn-cache-control' ] ) . toBe (
606
- 's-maxage=31536000, stale-while-revalidate=31536000' ,
606
+ 's-maxage=31536000, stale-while-revalidate=31536000, durable ' ,
607
607
)
608
608
609
609
// the page is cached
@@ -634,7 +634,7 @@ test.describe('Page Router with basePath and i18n', () => {
634
634
expect ( headers2Json [ 'cache-status' ] ) . toMatch ( / " N e x t .j s " ; h i t / m)
635
635
}
636
636
expect ( headers2Json [ 'netlify-cdn-cache-control' ] ) . toBe (
637
- 's-maxage=31536000, stale-while-revalidate=31536000' ,
637
+ 's-maxage=31536000, stale-while-revalidate=31536000, durable ' ,
638
638
)
639
639
640
640
const data2 = ( await response2Json ?. json ( ) ) || { }
@@ -728,7 +728,7 @@ test.describe('Page Router with basePath and i18n', () => {
728
728
expect ( headers3Json [ 'cache-status' ] ) . toMatch ( / " N e x t .j s " ; h i t / m)
729
729
}
730
730
expect ( headers3Json [ 'netlify-cdn-cache-control' ] ) . toBe (
731
- 's-maxage=31536000, stale-while-revalidate=31536000' ,
731
+ 's-maxage=31536000, stale-while-revalidate=31536000, durable ' ,
732
732
)
733
733
734
734
const data3 = ( await response3Json ?. json ( ) ) || { }
@@ -817,7 +817,7 @@ test.describe('Page Router with basePath and i18n', () => {
817
817
expect ( response4Json ?. status ( ) ) . toBe ( 200 )
818
818
expect ( headers4Json [ 'x-nextjs-cache' ] ) . toBeUndefined ( )
819
819
expect ( headers4Json [ 'netlify-cdn-cache-control' ] ) . toBe (
820
- 's-maxage=31536000, stale-while-revalidate=31536000' ,
820
+ 's-maxage=31536000, stale-while-revalidate=31536000, durable ' ,
821
821
)
822
822
823
823
const data4 = ( await response4Json ?. json ( ) ) || { }
@@ -863,7 +863,7 @@ test.describe('Page Router with basePath and i18n', () => {
863
863
expect ( headers1 [ 'x-nextjs-cache' ] ) . toBeUndefined ( )
864
864
expect ( headers1 [ 'netlify-cache-tag' ] ) . toBe ( `_n_t_/de${ pagePath } ` )
865
865
expect ( headers1 [ 'netlify-cdn-cache-control' ] ) . toBe (
866
- 's-maxage=31536000, stale-while-revalidate=31536000' ,
866
+ 's-maxage=31536000, stale-while-revalidate=31536000, durable ' ,
867
867
)
868
868
869
869
const date1 = await page . textContent ( '[data-testid="date-now"]' )
@@ -892,7 +892,7 @@ test.describe('Page Router with basePath and i18n', () => {
892
892
expect ( headers1Json [ 'x-nextjs-cache' ] ) . toBeUndefined ( )
893
893
expect ( headers1Json [ 'netlify-cache-tag' ] ) . toBe ( `_n_t_/de${ pagePath } ` )
894
894
expect ( headers1Json [ 'netlify-cdn-cache-control' ] ) . toBe (
895
- 's-maxage=31536000, stale-while-revalidate=31536000' ,
895
+ 's-maxage=31536000, stale-while-revalidate=31536000, durable ' ,
896
896
)
897
897
const data1 = ( await response1Json ?. json ( ) ) || { }
898
898
expect ( data1 ?. pageProps ?. time ) . toBe ( date1 )
@@ -920,7 +920,7 @@ test.describe('Page Router with basePath and i18n', () => {
920
920
expect ( headers2 [ 'cache-status' ] ) . toMatch ( / " N e x t .j s " ; h i t / m)
921
921
}
922
922
expect ( headers2 [ 'netlify-cdn-cache-control' ] ) . toBe (
923
- 's-maxage=31536000, stale-while-revalidate=31536000' ,
923
+ 's-maxage=31536000, stale-while-revalidate=31536000, durable ' ,
924
924
)
925
925
926
926
// the page is cached
@@ -952,7 +952,7 @@ test.describe('Page Router with basePath and i18n', () => {
952
952
expect ( headers2Json [ 'cache-status' ] ) . toMatch ( / " N e x t .j s " ; h i t / m)
953
953
}
954
954
expect ( headers2Json [ 'netlify-cdn-cache-control' ] ) . toBe (
955
- 's-maxage=31536000, stale-while-revalidate=31536000' ,
955
+ 's-maxage=31536000, stale-while-revalidate=31536000, durable ' ,
956
956
)
957
957
958
958
const data2 = ( await response2Json ?. json ( ) ) || { }
@@ -1019,7 +1019,7 @@ test.describe('Page Router with basePath and i18n', () => {
1019
1019
expect ( headers3Json [ 'cache-status' ] ) . toMatch ( / " N e x t .j s " ; h i t / m)
1020
1020
}
1021
1021
expect ( headers3Json [ 'netlify-cdn-cache-control' ] ) . toBe (
1022
- 's-maxage=31536000, stale-while-revalidate=31536000' ,
1022
+ 's-maxage=31536000, stale-while-revalidate=31536000, durable ' ,
1023
1023
)
1024
1024
1025
1025
const data3 = ( await response3Json ?. json ( ) ) || { }
@@ -1040,7 +1040,7 @@ test.describe('Page Router with basePath and i18n', () => {
1040
1040
expect ( await page . textContent ( 'h1' ) ) . toBe ( '404' )
1041
1041
1042
1042
expect ( headers [ 'netlify-cdn-cache-control' ] ) . toBe (
1043
- 'no-cache, no-store, max-age=0, must-revalidate' ,
1043
+ 'no-cache, no-store, max-age=0, must-revalidate, durable ' ,
1044
1044
)
1045
1045
expect ( headers [ 'cache-control' ] ) . toBe ( 'no-cache,no-store,max-age=0,must-revalidate' )
1046
1046
} )
@@ -1056,7 +1056,7 @@ test.describe('Page Router with basePath and i18n', () => {
1056
1056
expect ( await page . textContent ( 'h1' ) ) . toBe ( '404' )
1057
1057
1058
1058
expect ( headers [ 'netlify-cdn-cache-control' ] ) . toBe (
1059
- 's-maxage=31536000, stale-while-revalidate=31536000' ,
1059
+ 's-maxage=31536000, stale-while-revalidate=31536000, durable ' ,
1060
1060
)
1061
1061
expect ( headers [ 'cache-control' ] ) . toBe ( 'public,max-age=0,must-revalidate' )
1062
1062
} )
0 commit comments