7 ms·
This does not explain how the client-side cache is kept up-to-date. Cache invalidation matters. You want instantaneous updates on the client if the data has bee
by WimLeers 11y ago
This does not explain how the client-side cache is kept up-to-date. Cache invalidation matters. You want instantaneous updates on the client if the data has been updated on the server.
E.g. What if the like count has been updated?
Curious what solutions GraphQL offers for this. If it doesn't solve this itself, then what do GraphQL apps do today to solve this?
- ollysb 11y agoFacebook does have an internal solution for push updates, I believe they use long http requests. There were some talk of relay adding support for updates via websockets, anyone have any information?
- WimLeers 11y agoInteresting; I'd love to read _what_ exactly they send in those long HTTP requests. I'd think something along the lines of Surrogate Keys/Cache Tags would make sense: - https://www.drupal.org/developing/api/8/cache/tags https://www.drupal.org/developing/api/8/cache/tags - http://info.varnish-software.com/blog/advanced-cache-invalidation-strategies http://info.varnish-software.com/blog/advanced-cache-invalid... (ugh, they broke their site, cached at https://pinboard.in/cached/a31c4630dd2d/ https://pinboard.in/cached/a31c4630dd2d/) - https://www.fastly.com/blog/surrogate-keys-part-1 https://www.fastly.com/blog/surrogate-keys-part-1 - https://blog.cloudflare.com/introducing-a-powerful-way-to-purge-cache-on-cloudflare-purge-by-cache-tag/ https://blog.cloudflare.com/introducing-a-powerful-way-to-pu...
- sanderjd 11y agoWoah, thanks for those links. All very useful.
- estefan 11y agoThere's been some mention of supporting subscriptions, but I haven't heard anything about implementation. I think it's on their roadmap.