21
Propagate cache updates to all regions
Shane Cavaliere
It would be great if GraphCDN could propagate cache updates into all regions automatically.
For example: A user in some region makes a request to a GraphCDN endpoint which results in a cache miss. GraphCDN gets the data from the origin and adds it to its cache not just in that region, but in all regions. That way, when another user in some other region makes the same query, they benefit from that cached response.
Activity Feed
Sort by
Srikanth
You'd need a way to figure out which queries are unique to users and which have generic responses as feedback.
My graphql queries generally have different data being pulled from different users.
I doubt there is a trivial solution to this.
Marko Locher
Srikanth: Hey Srikanth, we do have a solution for this already called Scopes. Please see https://stellate.co/docs/graphql-edge-cache/scopes for more information.
At a high level, Scopes allow you to divide the cache into different buckets based on the values of a header or cookie. This allows you to cache data for a specific user, or even a group of users.
Daniel Mathews
Just to explain my usecase, maybe others might have as well.
Some of my GraphQL types are the same for all users (and it would be awsome
to globally progogate them). Others are user specific are it might not have much benefit to propagate those types.
Jon Low
This would be very useful for things like serverless functions that have dynamic IP addresses (eg deploys or API routes on Vercel). Then there is a guarantee that the serverless function always has access to fresh data in close proximity to it.
T
Tim Suchanek
Thanks Shane for raising this! We'll look into how we can make this happen and will update you here!