Purge by Scope value
complete
Martin Bilbao
Hi folks! ✋ Understanding GraphCDN has the "Scope" to protect certain data that should be private, it would be great to have a way to clean up by "Scope value". In our app, most of the things are private and the content is returned in the language the user set, so it would be convenient to be able to clean up the entire cache or part of it related to one user when, for example in our case, they "change the language". Thank you for this great product!
T
Tim Suchanek
complete
Hey everyone, we just implemented purging by scope!
You can read more about it in the changelog page: https://changelog.stellate.co/introducing-purging-by-scopes-dEoRW
Trevor Heath
Tim Suchanek: Hey Tim! Any expectation to allow purging type/query and scope? or only entire scope for now?
Tim Suchanek
Trevor Heath: Hey Trevor, so far only the entire scope. I'll create a separate feature request for that and add an upvote from you!
Trevor Heath
+1 You currently have to clear an entire query when you cannot target a specific ID (adding to a list). While targeting a scope value like orgId or customerId would make this more fine-grained.
Sarmad Qadri
+1, we really need this for our app
Anir Agarwal
+1 on this - it'd make our multi-tenant API far easier to implement and simplify it as well. Right now, we pass repetitive fields into queries that we really don't need because we can't use easy scope-level purging
Kirk Marple
+1 on this. Right now, we don't have a way to purge by customer in a multi-tenant API, since the 'customer id' comes from the JWT.
Purging by scope (now that JWT-based scopes was released) would be a great perf benefit.
Thomas Heyenbrock
This would make lot of sense. Something like
mutation {
purgeTodo(scopeId: '<userid>')
}
At the moment is not possible to purge by scope and the only possibility is to purge results for all the users, reducing a lot the HIT rate. One user mutation invalidates data for all the users. Performance wise this can be a massive
David Barrat
Thomas Heyenbrock: other purging options have been proposed
Something generic like that would make sense to me:
mutation {
purgeTodoBy("scope", ["AUTHENTICATED", userId])
}
mutation {
purgeTodoBy("tag", ["restricted", "dashboard"])
}