File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
packages/cache-handler/src Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -865,7 +865,10 @@ export class CacheHandler implements NextCacheHandler {
865
865
incrementalCacheValue : CacheHandlerParametersSet [ 1 ] ,
866
866
ctx : CacheHandlerParametersSet [ 2 ] & { neshca_lastModified ?: number } ,
867
867
) : Promise < void > {
868
- if ( incrementalCacheValue ?. kind !== CachedRouteKind . PAGES ) {
868
+ if (
869
+ incrementalCacheValue ?. kind !== CachedRouteKind . PAGES ||
870
+ ctx . fetchCache === true
871
+ ) {
869
872
return ;
870
873
}
871
874
@@ -880,7 +883,9 @@ export class CacheHandler implements NextCacheHandler {
880
883
) ;
881
884
}
882
885
883
- const { revalidate, neshca_lastModified } = ctx ;
886
+ const { neshca_lastModified, cacheControl } = ctx ;
887
+
888
+ const revalidate = cacheControl ?. revalidate ;
884
889
885
890
const lastModified = Math . round ( neshca_lastModified ?? Date . now ( ) ) ;
886
891
Original file line number Diff line number Diff line change @@ -180,7 +180,11 @@ export async function registerInitialCache(
180
180
headers : undefined ,
181
181
status : undefined ,
182
182
} ,
183
- { revalidate, neshca_lastModified : lastModified } ,
183
+ {
184
+ neshca_lastModified : lastModified ,
185
+ fetchCache : false ,
186
+ cacheControl : { revalidate, expire : 0 } ,
187
+ } ,
184
188
) ;
185
189
} catch ( error ) {
186
190
if ( debug ) {
You can’t perform that action at this time.
0 commit comments