Skip to content

Commit

Permalink
fix(cache): invalidate entries with undefined body
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Oct 18, 2022
1 parent 81d744d commit e9285da
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/runtime/cache.ts
Expand Up @@ -125,6 +125,7 @@ export function defineCachedEventHandler <T=any> (
},
validate: (entry) => {
if (entry.value.code >= 400) { return false }
if (entry.value.body === undefined) { return false }
return true
},
group: opts.group || 'nitro/handlers',
Expand Down

0 comments on commit e9285da

Please sign in to comment.