Next.js Discord

Discord Forum

Issue with default caching

Answered
fran posted this in #help-forum
Open in Discord
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 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.
Answered by Ray
View full answer

23 Replies

I leave the images of the components here:
@fran I leave the images of the components here:
is the page static generated?
No, its dynamic
@fran Click to see attachment
there is a 30 sec router cache
do you see the value changed if you refresh the page
yeah, if i refresh i can see!
yes you hit the router cache
@Ray there is a 30 sec router cache
could be disabled?
try it in 30 sec
@fran could be disabled?
currently, no
😮
or use <a> tag instead of Link
i thought noStore invalidate all the "automatic caching"
but it is not recommended
Answer
hmmmm so right now there is no "correct" way to achieve?
@fran hmmmm so right now there is no "correct" way to achieve?
yeah no official way
okey, so i will keep waiting
ty a lot @Ray!