DEV Community

Discussion on: NextJS, Contentful CMS, GraphQL, oh my!

bairrada97 profile image

Exactly, I have to investigate more, Its a thing that I plan to do later in my project. Because the data will update every 15s but once the day is over that same data will not be updated ever again, and a new day starts with fresh data to be updated every 15s again. And I dont want to use headless CMS because If I have 10k online users and every single of them start to click on every day from last 5y, I'll reach the limit of calls.
Since Im using Vue 3, maybe I can create a db on server with the power of reactivity and once day is over I make a post to that db with the data , and if the user clicks on a day that is lesser than today will grab data from db, if not will grab data from third party api.
And maybe with service workers or with SS cache I can make it work. If only 1 user visits that page from 3y ago, 10k users will see instant on browser because Its already in cache.

Well this is what Im thinking dont know if will work or not