Can unstable_cache functions be prefetched at build time? | v14
Unanswered
Barbary Lion posted this in #help-forum
Barbary LionOP
I have a page that fetches long loading data depending on some filters. Is there a way I can preload all possible data by calling all functions that are wrapped with unstable_cache?
8 Replies
lol - what kind of filters did you mean?
I never heard of it btw
Barbary LionOP
page numbers, categories, time periods, sorting etc.
Sloth bear
If you're using
unstable_cache
, therefore you're rendering data on server-side. Therefore what point is for preloading?Preloading may be a good idea when you're using Browser API to fetch an API (on client-side).
well, it's a bad idea to preload all possible data
never heard of that approach for filtering
No its not possible via the unstable_cache method itself. You need to visit the website for the first time right after build to preload the data