systemphil / symposia

Symposia is a philosophy course platform🏺
https://symposia.sphil.xyz
Apache License 2.0
6 stars 1 forks source link

Admin course page (routes) not updating after new data #32

Closed Firgrep closed 9 months ago

Firgrep commented 11 months ago

I noticed as I was re-populating one of the courses with new mdx material after the schema change that the page wouldn't update upon hitting "back" in the browser. I then saw that it also wasn't updated navigating around the site. NextJS aggressively caches data now, but I thought I had switched it off using export const dynamic = 'force-dynamic'in the admin/layout.tsx file.

I've added export const revalidate = 0 and it looks like it resolved updating on navigation but not when hitting "back".

So this is something we should try to fix and thoroughly test before we get to production.

https://nextjs.org/docs/app/building-your-application/caching https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config https://github.com/vercel/next.js/issues/49450