@@ -113,17 +113,17 @@ export default class Cache {
113
113
return null ;
114
114
}
115
115
116
- const cacheData = cachedEntry ? .value ;
116
+ const cacheData = cachedEntry . value ;
117
117
118
- const meta = cacheData ? .meta ;
118
+ const meta = cacheData . meta ;
119
119
const tags = getTagsFromValue ( cacheData ) ;
120
120
const _lastModified = cachedEntry . lastModified ?? Date . now ( ) ;
121
121
const _hasBeenRevalidated = await hasBeenRevalidated (
122
122
key ,
123
123
tags ,
124
124
cachedEntry ,
125
125
) ;
126
- if ( cacheData === undefined || _hasBeenRevalidated ) return null ;
126
+ if ( _hasBeenRevalidated ) return null ;
127
127
128
128
const store = globalThis . __openNextAls . getStore ( ) ;
129
129
if ( store ) {
@@ -400,18 +400,21 @@ export default class Cache {
400
400
}
401
401
}
402
402
403
+ // TODO: We should delete/update tags in this method
404
+ // This will require an update to the tag cache interface
403
405
private async updateTagsOnSet (
404
406
key : string ,
405
407
data ?: IncrementalCacheValue ,
406
408
ctx ?: IncrementalCacheContext ,
407
409
) {
408
410
if (
409
411
globalThis . openNextConfig . dangerous ?. disableTagCache ||
410
- globalThis . tagCache . mode === "nextMode"
412
+ globalThis . tagCache . mode === "nextMode" ||
413
+ // Here it means it's a delete
414
+ ! data
411
415
) {
412
416
return ;
413
417
}
414
-
415
418
// Write derivedTags to the tag cache
416
419
// If we use an in house version of getDerivedTags in build we should use it here instead of next's one
417
420
const derivedTags : string [ ] =
0 commit comments