Implement client-side caching in useDataCache()
As a follow-up to #25 that introduced client-side caching in useCachedAsyncData, explore options to also add client-side caching to useDataCache, possibly reusing/sharing code from useCachedAsyncData.
Hi, sorry to bother you again. I think my question might be related to the previous one. Is there a way to retrieve data from useRouteCache() during client-side navigation?
When I first visit the website, it correctly fetches the data from the cache. However, during subsequent client-side navigation, it queries the CMS again. Is it possible to avoid this behavior?
Thank you in advance
Sorry, just saw the reply now.
Is there a way to retrieve data from useRouteCache() during client-side navigation?
Did you mean useDataCache here? If yes, then the answer is no, it's not possible to directly access the data cache on the client side, since it only "exists" on the server. Once this feature in this issue is implemented you could have a separate data cache that only exists in the browser. It would work pretty much the same as on the server, just that they are "detached" from each other.