How can I cache db operations in server components so they run every ~10h or so If I dont use fetch?
Unanswered
Siamese Crocodile posted this in #help-forum
Siamese CrocodileOP
I am using prisma and a server component doing just a simple getAll and I want to cache this data so the page is static and revalidated over time on the server
7 Replies
@joulev export const revalidate = 36000
Siamese CrocodileOP
that doesnt work
database operation runs on every request
only unstable_cache with revalidate works fine
Siamese CrocodileOP
is it the right approach?
Siamese CrocodileOP
ah I forgot, the page is dynamic, maybe thats why
@Siamese Crocodile ah I forgot, the page is dynamic, maybe thats why
Yes that’s exactly why