Skip to content

Commit

Permalink
fix: handle APP_PAGE cache kind when checking tag staleness
Browse files Browse the repository at this point in the history
  • Loading branch information
pieh committed Jun 14, 2024
1 parent 073a98e commit 25ed0e4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/run/handlers/cache.cts
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,11 @@ export class NetlifyCacheHandler implements CacheHandler {

if (cacheEntry.value?.kind === 'FETCH') {
cacheTags = [...tags, ...softTags]
} else if (cacheEntry.value?.kind === 'PAGE' || cacheEntry.value?.kind === 'ROUTE') {
} else if (
cacheEntry.value?.kind === 'PAGE' ||
cacheEntry.value?.kind === 'APP_PAGE' ||
cacheEntry.value?.kind === 'ROUTE'
) {
cacheTags = (cacheEntry.value.headers?.[NEXT_CACHE_TAGS_HEADER] as string)?.split(',') || []
} else {
return false
Expand Down

0 comments on commit 25ed0e4

Please sign in to comment.