lpmagal
lpmagal
NNuxt
Created by lpmagal on 11/29/2024 in #❓・help
dumb question: cache usage with useFetch
@kapa.ai what about cache at server side - nitro, for example ?
27 replies
NNuxt
Created by lpmagal on 11/29/2024 in #❓・help
dumb question: cache usage with useFetch
@kapa.ai alright. In this case, the component does not need to server-render the data as I'm showing the "loading" state of the componente. Is the lazyFetch still required ?
27 replies
NNuxt
Created by lpmagal on 11/29/2024 in #❓・help
dumb question: cache usage with useFetch
@kapa.ai Hm, right. I have an use case that's causing questions on my head. I have the "/" page and "/wathever-page". As soon I enter the "/" page, the component will fire that API request as mentioned above. I would like that when navigating to "wathever" page and coming back to "/", as soon as the component mounts, to not fire the API but the cache - since I didnt need to invalidate that data. I just wanted to spare some requests - using the cache. What would be the best approach ?
27 replies
NNuxt
Created by lpmagal on 11/29/2024 in #❓・help
dumb question: cache usage with useFetch
///
27 replies
NNuxt
Created by lpmagal on 11/29/2024 in #❓・help
dumb question: cache usage with useFetch
@kapa.ai I really thought that we would have a native caching solution - that didn't require us to manually type how to cache. I.E:
const { data: response, error } = await useFetch(
'/api/...',
{
method: 'GET',
key: 'my-key-here',
}
)
const { data: response, error } = await useFetch(
'/api/...',
{
method: 'GET',
key: 'my-key-here',
}
)
Calling this 1st time would fire the API request. Calling this the 2nd time would load from cache. I believe then there is no such thing - I mean, cache automatically without having to set up a method (like localStorage or pinia) ?
27 replies
NNuxt
Created by lpmagal on 11/29/2024 in #❓・help
dumb question: cache usage with useFetch
//
27 replies
AAlokai
Created by Altamash on 1/2/2024 in #🙋|general-help
Stripe payment gateway Integration in VSF
Hey Altamash. Are you looking for freelancers to do the integration ?
6 replies