Skip to content

Commit

Permalink
increase cache time
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Nov 7, 2024
1 parent 1237656 commit 90abdf4
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions test/fixture/api/cached.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
export default defineCachedEventHandler((event) => {
return {
timestamp: Date.now(),
eventContextCache: event.context.cache,
};
});
export default defineCachedEventHandler(
(event) => {
return {
timestamp: Date.now(),
eventContextCache: event.context.cache,
};
},
{ swr: true, maxAge: 10 }
);

0 comments on commit 90abdf4

Please sign in to comment.