Edge caching for the group's Global CMS
Cloudflare in front of the group's Global CMS. Visitors get a cached page at once, and a publish shows in every market within seconds.
- brand sites behind the cache
- 270+
- of requests answered at the edge
- 97%
The challenge
Pernod Ricard's brand sites run on one Global CMS, WordPress on Pantheon. More than 270 sites share the same platform.
Without a cache in front, WordPress has to build every page view. That makes pages slower for visitors and puts all the traffic on the platform.
Our role
We set up Cloudflare in front of the group's Global CMS and built the cache purging. The platform itself and the hosting on Pantheon are run by the group.
- Stack
- Cloudflare
- WordPress
- Pantheon
A cached page at once, a fresh one within seconds
Cloudflare answers the visitor from cache and fetches a new version in the background. When an editor publishes, only the pages that changed are purged.
Visitor
A visitor opens a brand site, from any market.
- Visitor: Every market
Edge
Cloudflare answers from cache. If the page is stale it is still sent at once, and the edge fetches a new version in the background.
- Cloudflare: Answers from cache
- Cache purge: By cache tag
Platform
WordPress on Pantheon builds a page only when the edge asks for it. With origin shielding, requests are gathered in Cloudflare before they reach the platform.
- Global CMS: WordPress on Pantheon
Editor
When an editor publishes, exactly the pages the publish touched are purged, by cache tag, in every market.
- Editor: Publishes
What we built
Stale-while-revalidate
Visitors always get a cached page at once. If it is stale, the edge fetches a new version in the background, so no one waits for WordPress to build the page.
Purging by tag
Every page carries cache tags. A publish purges exactly the pages it touched, in every market, within seconds, and the rest of the cache stays warm.
Cache rules per market
Rules are set per market, so each market's pages are cached and purged on their own.
Origin shielding
Requests that miss the cache are gathered in Cloudflare before they go on, so Pantheon sees only a fraction of the traffic.
One shared plugin
The purge logic lives in a WordPress plugin we wrote. Today five of the group's brand sites use it.
Where it stands
- More than 270 brand sites on the group's Global CMS sit behind the cache.
- 97% of requests are answered at the edge and never reach the platform.
- A publish shows in every market within seconds.