Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
pass cache options
  • Loading branch information
pi0 committed Oct 15, 2022
commit 014f5e0c81a7d01c16efbc0ce4da481cb17f0aa5
5 changes: 3 additions & 2 deletions src/runtime/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ function createNitroApp (): NitroApp {

// Wrap matching handlers for caching route options
const routeOptions = getRouteOptionsForPath(h.route.replace(/:\w+|\*\*/g, '_'))
if (routeOptions.swr) {
if (routeOptions.cache) {
handler = cachedEventHandler(handler, {
group: 'nitro/routes'
group: 'nitro/routes',
...routeOptions.cache
})
}

Expand Down