Who sees what
The problem
Members see member prices, guests see list prices. Cache the page once, and one audience can get the other's prices; turn caching off, and every request goes to your origin again.
With GraphPilot
Say who shares an answer right in your schema: @cacheControl with PUBLIC, PRIVATE, or an audience you name, such as a membership tier, in your own CacheControlScope enum. Your configuration says where that audience comes from, for example a claim of the token GraphPilot verified at the edge. GraphPilot works out each response's audience from what the query selected, so members and guests each get their own cached answer.
Docs: Who shares an entry ↗Transcript
Your store shows member prices to logged-in members, and list prices to everyone else.
Cache that page once, and the wrong people can get the wrong prices.
Turn caching off for it, and every request hits your origin again.
GraphPilot verifies the token at the edge and reads the claims you choose, like the membership tier.
Say who shares an answer right in your schema: public, private, or an audience you name, like a membership tier.
Your config says where that audience comes from, here a verified token claim, and GraphPilot works out each response's audience from what the query selected.
Members get member prices from the cache, guests get list prices, and one audience's answer is not served to another.
The value itself is written in Radiogram, GraphPilot's expression language.
Cleared for takeoff
Start on Glider (Free).
No credit card, no commitment.
Prefer to talk first? Book a call