Richie78321/Vaccinate-PA

Find a way to move back to static site generation

Richie78321 opened this issue · 0 comments

See https://nextjs.org/docs/basic-features/data-fetching#incremental-static-regeneration

Had to move NextJS to server-side rendering instead of static site generation b/c of this smallll but critical problem which is that a static site rebuild is triggered when a user visits a page that is stale, but only the next visitor sees that new rebuilt page, meaning that the first visitor would see stale data
So this means that the site is being rendered per-request, but Airtable data is being cached at 60 seconds so we wont run into any API rate limits. Just means that the site will load a little slower but is guaranteed to be within 60 seconds of the newest data.

If anyone is aware of a way that we could reliably trigger rebuilds on a per-page basis by making a client request to the webpage when new data is made available, that could be a solution but honestly the increase in load time isn't terrible.