Issue with default caching
Answered
fran posted this in #help-forum
franOP
Hi all, I am having a problem with the default caching by nextjs, on my side I have 2 components that I don't want to cache ever. They both make a request to a redis database and return a number.
Currently both components use
Currently both components use
unstable_noStore
to prevent caching but it doesn't seem to work. I leave a reproduction of the error if someone can give me a hand, also a picture of both components.23 Replies
franOP
I leave the images of the components here:
is the page static generated?
franOP
No, its dynamic
there is a 30 sec router cache
do you see the value changed if you refresh the page
franOP
yeah, if i refresh i can see!
yes you hit the router cache
franOP
could be disabled?
try it in 30 sec
currently, no
franOP
😮
or use
<a>
tag instead of Link
franOP
i thought noStore invalidate all the "automatic caching"
but it is not recommended
Answer
franOP
hmmmm so right now there is no "correct" way to achieve?
yeah no official way
franOP
okey, so i will keep waiting
ty a lot @Ray!
np