Hi Team,
I am using SWR to cache the api data to use entire session until page get reload or refresh. I want to hit the api only once when the user visits the page first time and don't want to hit again when user revisit the page.
Here is the scenario:
User will login to the home page and visits the blog page. blog page has the api functionality to catch the data and use the entire session until page get refresh.
And the user go back to home page and revisit the blog page i need to use cached data without hitting a api call.
Is there any solution for this scenario. I tried all the options like revalidateOnMount, revalidateOnFocus and mutate and etc. But, no luck.
Hi Team, I am using SWR to cache the api data to use entire session until page get reload or refresh. I want to hit the api only once when the user visits the page first time and don't want to hit again when user revisit the page.
Here is the scenario:
Is there any solution for this scenario. I tried all the options like revalidateOnMount, revalidateOnFocus and mutate and etc. But, no luck.
Your help is highly appreciated.
Thank you