Speed is the most important feature of any website. This article explains how our multi-layer caching architecture works and how you can fine-tune it.
The Three Cache Layers
1. Browser Cache
Static assets (CSS, JS, images, fonts) are served with long-lived Cache-Control headers. When a visitor returns, their browser loads these assets from local disk — zero network requests.
2. Edge Cache (Cloudflare)
HTML pages and API responses are cached at over 300 Cloudflare edge locations worldwide. When a visitor in Tokyo requests your site, the response comes from a Tokyo data center — not your origin server in Virginia.
We use stale-while-revalidate so visitors always get an instant response while fresh content is fetched in the background.
3. Object Cache (Origin)
Database queries and computed results are stored in a persistent key-value store at the origin. This means even cache misses that reach the origin are fast, because WordPress doesn’t need to hit the database for every request.
Cache Purging
Content updates trigger automatic, targeted cache purges. When you publish a post, only the affected URLs are invalidated — not the entire cache. You can also trigger a full purge from the control panel under WordPress → Cache.
Custom Cache Rules
For advanced use cases, you can define custom cache rules per URL pattern:
- Bypass — Always fetch from origin (useful for authenticated pages).
- Short TTL — Cache for 60 seconds (good for frequently updated feeds).
- Long TTL — Cache for 24 hours (ideal for static landing pages).
Configure these in the control panel under WordPress → Performance.
Measuring Performance
Use the Performance tab in your site dashboard to see:
- Cache hit ratio (target: >95%)
- Time to First Byte (TTFB) at the edge
- Origin response time
- Bandwidth saved by caching