The publisher’s ops team watched the dashboard go vertical. A news article had hit Reddit’s front page, then Twitter, then every morning newsletter in Europe. Traffic climbed from 3,000 concurrent visitors to 180,000 in under 40 minutes. Their managed WordPress host — a tier-1 provider with a dedicated cluster — had already started returning 503s. The alternative was EmDash, deployed on Cloudflare Workers, using edge caching they hadn’t fully stress-tested in production. They switched DNS that afternoon. The spike lasted three days. Total downtime: zero.
The Problem: When a Shared Cache Isn’t Shared Enough
Before the switch, the publisher ran a standard WordPress stack on a six-server Nginx cluster with Redis page caching and a Cloudflare Enterprise CDN in front. The setup handled 500,000 monthly visitors without complaint. But viral traffic is a different animal. It arrives in a wall — not a curve. The CDN cached static assets well, but HTML pages (the actual article content) had a TTL of only 60 seconds to keep comments and live updates fresh. During the Reddit event, every cache miss hit the origin servers. Within minutes, the Redis pool saturated, the PHP worker pool maxed out, and the load balancer started dropping connections.
We had 60-second TTLs, but the actual cache hit ratio during the spike was below 15%. We were serving each visitor from origin.
The root cause wasn’t capacity — it was cache granularity. WordPress’s page cache is keyed by URL, but a single viral article with dynamic widgets (recent posts, ad slots, comment counts) invalidates half the cache on every view. The publisher’s ops lead later told me: “We had 60-second TTLs, but the actual cache hit ratio during the spike was below 15%. We were serving each visitor from origin.”
The Approach: Edge Caching That Doesn’t Flinch
EmDash’s architecture changes the caching equation at three levels. First, the CMS itself is serverless. Every page is rendered by Astro on Cloudflare Workers, and the output is cached at the edge across 330+ data centers. Second, content is stored as structured JSON (portable text), not HTML. That means the cache can be invalidated at the content-block level, not the full page. Third, Workers allow custom cache logic that WordPress plugins can’t express — like serving stale content while revalidating in the background, or caching authenticated pages per user segment.
For the publisher, the critical change was moving from “cache or don’t cache” to “cache aggressively, revalidate lazily”. They configured EmDash’s built-in route caching with a stale-while-revalidatecodecodecodecode window of 300 seconds. A visitor hitting a cached article would get a sub-50ms response. The worker would then fetch a fresh version in the background — but wouldn’t block the user. If the background fetch failed (say, the database was busy), the stale cache served for up to an hour.
WordPress can approximate this with a reverse proxy like Varnish, but Varnish doesn’t understand your content types. EmDash’s cache tags — generated automatically from content type, author, and category — let them purge only the sections that changed. A comment on an article didn’t clear the entire article cache; it cleared only the comment block’s cached fragment. The rest stayed hot.
The Implementation: Three Config Changes That Did the Heavy Lifting
The migration from WordPress took six hours, mostly data export and theme porting. The caching configuration took another hour. Here’s what mattered:
1. Route-level TTLs per content type. The blog index (high churn) got a 30-second cache. Article pages (lower churn) got 300 seconds. Author archives (rarely visited) got 3600 seconds. EmDash’s Astro-based routing made this trivial — a cachecodecodecodecode export in each page component. WordPress would require a custom plugin or a reverse-proxy config change.
2. Edge-side inclusion with include()codecodecodecode directives. The publisher’s homepage had a “trending now” widget that queried recent page views. In WordPress, that query hits the database on every load. In EmDash, they used a Cloudflare Worker binding to KV (key-value store) to cache the trending list for 60 seconds, then embedded it via an edge-side include. The database never saw the request.
3. Cache warming via the MCP server. Before the expected spike (the publisher had a tip from a source about an upcoming embargo lift), they used EmDash’s built-in MCP server to programmatically hit the top 50 article URLs from 10 different geographic regions. This pre-populated the edge cache at every major Point of Presence. The warming script ran in 90 seconds.
The Results: What the Numbers Actually Show
During the three-day spike, the publisher served 12.4 million page views. The edge cache hit ratio across all pages was 94.7%. The origin (EmDash’s D1 database and R2 storage) received only 680,000 requests — mostly from the background revalidation workers, not from user-facing traffic. Peak concurrent users hit 220,000. The median time-to-first-byte measured across six continents was 40 milliseconds. Total additional cost on the Cloudflare paid plan (the $5/month tier with Workers Paid) came to $0.17 over the base charge — all from the 2.1 million revalidation worker invocations.
To be clear, this result is not typical for every EmDash deployment. The publisher’s content was mostly static (text articles with occasional embedded images). A site with heavy user-specific personalization or real-time multiplayer editing would see lower cache ratios. But for content-driven publishing — the use case WordPress was built for — edge caching at this granularity is a structural advantage, not a config tweak.
The Non-Obvious Lessons
Most discussions about EmDash’s performance focus on the V8 isolate cold-start speed or the zero-egress R2 storage. Those matter, but they’re table stakes. What the publisher’s ops team learned is that EmDash’s real leverage is in invalidation semantics — the ability to say “this fragment is stale, revalidate it, but don’t touch the rest of the page.” WordPress’s plugin ecosystem has never solved this because the architecture doesn’t allow it. Plugins write into the same global $wpdbcodecodecodecode and the same HTML buffer. There’s no concept of a cache tag that a plugin can respect without explicit opt-in.
The second non-obvious point: EmDash’s MCP server isn’t just for AI agents. The publisher used it to script their entire cache-warming routine. That same server can trigger cache purges from a CI/CD pipeline, automate content distribution across regions, or run periodic health checks that refresh stale entries before a spike hits. It turns the CMS into an programmable infrastructure component — not just a content editor.
The third lesson is about cost predictability. The $0.17 overage during a 12-million-view event surprised everyone. The publisher had been spending $1,200/month on a dedicated WordPress server cluster that still fell over under load. EmDash’s serverless billing — pay per request, not per reserved core — inverted the economics. Traffic spikes became a revenue event, not a cost event. That’s a fundamental shift for any publisher that lives by the ad-revenue model.
But there’s an edge case that would break this model: a site where every page is uncacheable — e.g., a membership site with per-user content, or a site that uses server-side rendering for every interaction. For those, EmDash’s worker invocation count would scale linearly with traffic, and the $5/month plan would not suffice. The publisher’s success depended on the cacheability of their content. That’s not a weakness of EmDash; it’s a constraint any architect should validate before migrating.
- What caused the publisher's original WordPress setup to fail?The root cause was cache granularity: a single viral article with dynamic widgets invalidated half the cache on every view, dropping the cache hit ratio below 15%.
- How does EmDash's edge caching differ from traditional WordPress caching?EmDash caches content as structured JSON at the edge across 330+ data centers, allows stale-while-revalidate, and supports cache invalidation at the content-block level.
- What was the cost impact of the traffic spike on EmDash?The publisher incurred only $0.17 in overage during a 12-million-view event, compared to $1,200/month for a dedicated WordPress cluster that still failed.