DEV Community

Discussion on: 🧠 A New React and the Old Cache

Collapse
 
gohulk profile image
Aravind Kamarajugadda

Hello Anton , Very interesting article focusing on Cache. Have you checked Apollo Client to cache on client side. if you are using client side rendering then you can use Apollo client side cache along with graphQL.

Collapse
 
thekashey profile image
Anton Korzunov

That’s apples and oranges.
Apollo cache is about caching data, and then using it to render a view.
This solution is about caching view, but not the data.
You may mix them together, and, get data and view caching simultaneously.
Even more - view layer caching will cut off all nested graphQL connectors and, yeah, πŸ¦„πŸŽ‰πŸ”₯.

TLDR - no, Apollo cache has nothing with this one.

Collapse
 
gohulk profile image
Aravind Kamarajugadda

Thanks for correcting on this. How does caching view works? Is this more specific to server side rendering? I have no knowledge about server side rendering and never came across caching view on client side implementation. All my implementations are using reactJS and GatsbyJS to render on client side.

Thread Thread
 
thekashey profile image
Anton Korzunov

That would take a while, but read Scaling React Server-Side Rendering/Component Caching.