Next.js Discord

Discord Forum

Same route, different revalidation timers

Unanswered
Bombay posted this in #help-forum
Open in Discord
BombayOP
Each of the routes in my nextjs app require data from supabase. Some of that data needs to be revalidated daily, some every five minutes, and some on demand via server action revalidate("/"). Supabase JS client doesnt give a clear way to specificy how long to cache the data. How can I specify the cache duration using supabase js. Is there a way to separate out the data fetches so I can use time based revalidation for some? Right now all of the db queries are in my page.jsx and get revalidated together on demand. This happens very frequently and I only need to revalidate a few specific queries that often.

0 Replies