mazipan / tanyaaja.in

❓Kumpulkan pertanyaan secara anonim dari siapa saja dengan mudah
https://tanyaaja.in
MIT License
138 stars 38 forks source link

Revalidate cache in statistic API #126

Open mazipan opened 1 year ago

mazipan commented 1 year ago

Is your feature request related to a problem? Please describe. Next.js will automatically cache the fetch in the server, we already set the cache key/tag for the statistics API. But never have a revalidation.

Ideally, we need to revalidate after new user is registered successfully.

And every new questions submitted.

Describe the solution you'd like

https://nextjs.org/docs/app/building-your-application/data-fetching/fetching-caching-and-revalidating#revalidating-data