mirror of
https://github.com/ArthurDanjou/website.git
synced 2026-01-14 12:14:42 +01:00
add cache to prisma
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
export default defineEventHandler(async () => {
|
||||
return await usePrisma().guestbookMessage.findMany({
|
||||
cacheStrategy: {
|
||||
ttl: 60 * 60,
|
||||
swr: 60 * 5,
|
||||
},
|
||||
orderBy: {
|
||||
updatedAt: 'desc',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user