add cache to prisma

This commit is contained in:
2023-12-14 17:42:13 +01:00
parent 268157b249
commit 62f4215c0c
11 changed files with 36 additions and 8 deletions

View File

@@ -1,5 +1,9 @@
export default defineEventHandler(async () => {
return await usePrisma().guestbookMessage.findMany({
cacheStrategy: {
ttl: 60 * 60,
swr: 60 * 5,
},
orderBy: {
updatedAt: 'desc',
},