re-hydrate the cache from storage #400
-
|
I am looking at a solution where we can hydrate the cache from a pre-known state, I can see how to extract the store through the subscribe method, but there is no way of populating the whole store again from that object that I can see. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
You can populate the cache using |
Beta Was this translation helpful? Give feedback.
You can populate the cache using
queryCache.setQueryData(queryKey, data). With that primitive, you should be able to do most anything you need to, including looping over cache entries and using that to hydrate the cache.