Merge multiple caches for restoration
See original GitHub issueWe’re looking at micro-frontends with SSR support. Currently each MFE is rendering a part of the page in React, and extracting the data.
Is there a way to extract the InMemoryCache
for each MFE, merge them, then create a new single Apollo client on the client using this merged cache?
Issue Analytics
- State:
- Created a year ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
multiple cache in a same job (#32814) · Issues - GitLab
Currently in CI pipelines we can use multiple cache using different keys. But we cannot use multiple cache on the same jobs.
Read more >Advanced topics on caching in Apollo Client
onResetStore multiple times. All of your callbacks are added to an array and are executed concurrently whenever the cache is reset. In this...
Read more >Caching Strategies - CircleCI
Listing multiple keys for restoring a cache increases the chances of a partial cache hit. However, broadening your restore_cache scope to a wider...
Read more >All about Using Multiple Cache Pools and Shares in Unraid 6.9
This is the 4th part of a series of videos all about Unraid 6.9. This series will take you through everything that you...
Read more >Pipeline caching - Azure - Microsoft Learn
This is useful if the pipeline is unable to find an exact match but wants to use a partial cache hit instead. To...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As a temporary solution maybe you can try something like this :
I’ve tested a few cases and it seems to work fine.
The solution from @jgan42 works well - it’s pretty much using the same code used internally for restoration