Content Invalidation, Edge Caching, and Data Freshness Model
Content Invalidation, Edge Caching, and Data Freshness Model
Section titled “Content Invalidation, Edge Caching, and Data Freshness Model”Document Status: 🟢 Approved & Active True Specification
Target Audience: Core Platform Architects, Edge Infrastructure Engineers, and Autonomous AI Agent Contributors
Governing Epic: Epic #38 (epic(architecture): content invalidation, edge caching, and data freshness model)
Companion Specifications: HIGH_LEVEL_DESIGN.md, docs/CLIENT_CMS.md, docs/DATA_ISOLATION_AND_STORAGE.md, ADR-0003, docs/specs/CLIENT_APPLICATION_ANATOMY.md, docs/specs/MULTI_WORKER_PLATFORM_SERVICES.md
1. Executive Summary & The Core Architectural Invariant
Section titled “1. Executive Summary & The Core Architectural Invariant”SiteSwarm powers bespoke web applications for local small businesses (bakeries, auto repair shops, dental clinics, boutique agencies). Small business web traffic is overwhelmingly read-heavy and content-driven. Anonymous public visitors reading daily specials, checking operating hours, or finding directions expect sub-30ms global Time-to-First-Byte (TTFB).
Simultaneously, business owners require a responsive mobile editing experience: when a baker sells out of sourdough at 8:15 AM or an auto mechanic posts an emergency winter storm closure from an iPhone, that operational update must reflect live across the globe in under 2 seconds.
flowchart LR subgraph MobileOwner["Small Business Owner (Smartphone)"] A["8:15 AM: Baker toggles\n'Sold Out of Sourdough'\non iPhone (<60s)"] --> B["Tap 'Publish Now'"] end
subgraph TheTension["The Fundamental Architectural Tension"] direction TB T1["Need 1: Sub-2-Second Freshness\nUpdate must appear instantly\nfor arriving morning customers"] T2["Need 2: Sub-30ms Global Delivery\nPages must serve from edge cache\nwith 0 KB client JS overhead"] T3["Need 3: D1 Read Shielding\nViral news or traffic spikes must\nnever exhaust SQLite connection locks"] end
subgraph PublicVisitors["Public Visitors (Global Edge)"] C["Visitor in neighborhood\nloads bakery.com (<20ms TTFB)"] D["Customer sees fresh alert:\n'Sold out of sourdough'"] end
B --> TheTension TheTension --> C --> DThe Three Foundational Architectural Decisions:
Section titled “The Three Foundational Architectural Decisions:”- Unified Static-First Edge Rendering: Emergency alert banners, hours, daily specials, menu catalogs, and long-form articles are not split into disparate rendering tiers or client-side JavaScript hydration widgets. All CMS content is unified into static-first Astro edge pages (
output: "static"). A content edit in CMS simply invalidates the cached page; on the next visitor request, the edge re-renders the complete, accessible HTML with 0 KB client JS and 0 Cumulative Layout Shift (CLS). - Configurable Fleet Invalidation (
edge-cacheCapability): Recognizes that clients vary in traffic and budget:swr-periodicStrategy: Simple, zero-API dependency, uses short TTLs (s-maxage=60) withstale-while-revalidate. Ideal for low-cost, low-maintenance basic sites.tag-purgeStrategy: Long TTL (s-maxage=86400, 24h), >99% edge cache hit rate, minimum worker compute, with instant sub-150ms global eviction via the centralized Platform Purge Service.hybridStrategy: Combines moderate TTLs with event-driven tag purging for maximum resilience.
- Isolated Platform Purge Service (
@siteswarm/service-cache-purge): Cloudflare Purge API credentials (CLOUDFLARE_API_TOKEN,ZONE_ID) are strictly isolated inside a dedicated platform worker. Client apps and CMS instances invoke purges via zero-latency Cloudflare Service Bindings (env.CACHE_PURGE_SERVICE), eliminating credential sprawl.
2. Foundational Caching & Freshness Invariants
Section titled “2. Foundational Caching & Freshness Invariants”Every client application deployed within the SiteSwarm fleet must strictly adhere to the following five architectural invariants:
2.1 The Sub-30ms Global Edge Delivery Invariant
Section titled “2.1 The Sub-30ms Global Edge Delivery Invariant”At least 99% of all public visitor requests across the fleet must be served directly from Cloudflare Anycast edge cache or Cloudflare Assets with a TTFB under 30ms globally. Warm visitor requests must never execute dynamic SQL queries against Cloudflare D1 or make external origin round-trips.
2.2 The Sub-2-Second Phone-to-Edge Freshness Invariant
Section titled “2.2 The Sub-2-Second Phone-to-Edge Freshness Invariant”When an authenticated business owner commits a content mutation in the CMS administrative studio, that update must propagate and render on the public website globally in under 2.0 seconds elapsed real time ($t_{\text{phone}} \to t_{\text{edge}} < 2000\text{ms}$).
2.3 The D1 Read Shield & Stampede Defense Invariant
Section titled “2.3 The D1 Read Shield & Stampede Defense Invariant”Under any public traffic volume—including viral spikes of 10,000 requests/second—the client’s underlying Cloudflare D1 SQLite database must never be queried at a rate exceeding 5 queries/second for cached CMS entities. Cache stampedes (thundering herds) must be structurally prevented in the edge worker via in-memory single-flight promise coalescing.
2.4 The Zero-Session-KV Invariant
Section titled “2.4 The Zero-Session-KV Invariant”In strict accordance with ADR-0003, public frontend workers (apps/<client>) build with output: "static" and declare zero KV namespace bindings (SESSION = 0). Edge caching operates via Cloudflare Cache-Tags and HTTP surrogate controls without provisioning ephemeral KV namespaces that exhaust account quotas during PR previews.
2.5 The Static Seed Fallback Invariant
Section titled “2.5 The Static Seed Fallback Invariant”If Cloudflare D1, internal service bindings, or Cloudflare API purge endpoints encounter temporary edge network partitions or transient outages, a client’s public website must never return an HTTP 500 error or a blank component slot. The edge template must automatically fall back to the statically bundled seed configuration defined in swarm.config.ts.
3. The 3-Tier Caching & Read Shield Topology
Section titled “3. The 3-Tier Caching & Read Shield Topology”To deliver sub-30ms latency while shielding Cloudflare D1 from traffic spikes, SiteSwarm separates data flow into three distinct caching tiers:
flowchart TD subgraph Tier1["Tier 1: Cloudflare Anycast Edge Cache (330+ Global PoPs)"] direction TB E1["Public Visitor Request"] --> E2{"Edge Cache Lookup\n(Cache-Key: URL + Host)"} E2 -->|"HIT (99.2% of requests)\nTTFB: < 15ms"| E3["Return Cached HTML\nCache-Control: s-maxage=86400, SWR=60\nCache-Tag: tenant:<slug>"] E2 -->|"MISS or EXPIRED\n(0.8% of requests)"| E4["Forward to Worker A (Edge Compute)"] end
subgraph Tier2["Tier 2: Worker Edge Memory & Read Shield (V8 Isolate)"] direction TB E4 --> W1{"In-Memory Micro-Cache?\n(TTL: 10s, Map<string, data>)"} W1 -->|"Micro-Cache HIT\nTTFB: < 22ms"| W2["Re-assemble HTML\nPopulate Tier 1 Edge Cache"] W1 -->|"Micro-Cache MISS\n(Thundering Herd Shield)"| W3["Coalesce to Single In-Flight Promise"] W3 --> W4["Dispatch to CMS Worker via 0ms Service Binding\nenv.CMS_SERVICE.getCMSState()"] end
subgraph Tier3["Tier 3: Source of Truth (Cloudflare D1 & R2)"] direction TB W4 --> D1["Worker B: Isolated CMS & Admin Engine"] D1 --> D2["Cloudflare D1 SQLite Database\n(Atomic Transactions / Global Read Replicas)"] D1 --> D3["Cloudflare R2 Object Storage\n(Zero-Egress Images & Media)"] end
W2 --> Tier1 D2 --> W43.1 Tier 1: Cloudflare Anycast Edge Cache (Global CDN Tier)
Section titled “3.1 Tier 1: Cloudflare Anycast Edge Cache (Global CDN Tier)”- Role: Absorbs 99%+ of anonymous public visitor traffic across Cloudflare’s 330+ edge data centers.
- Cache-Control Profile:
Cache-Control: public, max-age=0, s-maxage=86400, stale-while-revalidate=60Cache-Tag: tenant:green-leaf-bakery
max-age=0: Forces client browser to revalidate against Cloudflare edge, ensuring immediate visitor pickup after an edge purge.s-maxage=86400: Instructs Cloudflare edge caches to retain the warm representation for up to 24 hours.stale-while-revalidate=60: Allows the edge cache to serve slightly stale content for up to 60 seconds while background revalidation executes if an asset naturally expires.Cache-Tag: tenant:<slug>: Simple tenant surrogate key enabling instantaneous global eviction.
3.2 Tier 2: Worker Edge Memory & Single-Flight Read Shield
Section titled “3.2 Tier 2: Worker Edge Memory & Single-Flight Read Shield”- Role: Shields Cloudflare D1 from cache stampedes when Tier 1 encounters an edge cache miss (e.g. immediately following a purge or under viral traffic).
- Mechanics:
- In-Memory Micro-Cache: The worker isolate maintains an in-memory dictionary caching parsed CMS state with a 10-second TTL.
- Single-Flight Promise Coalescing: If 500 concurrent visitor requests hit the edge worker simultaneously following a purge, only one single query is dispatched to D1 via the CMS service binding. The remaining 499 requests await the resolution of that single shared promise.
- Zero Inter-Worker Latency: Communication between Worker A and Worker B uses native Cloudflare Service Bindings (
env.CMS_SERVICE), incurring 0ms network overhead within the same V8 process isolate.
3.3 Tier 3: Authoritative Database (Cloudflare D1 SQLite & R2)
Section titled “3.3 Tier 3: Authoritative Database (Cloudflare D1 SQLite & R2)”- Role: The durable, ACID-compliant source of truth.
- Mechanics: Attached exclusively to Worker B (the CMS worker) as specified in ADR-0003. WAL mode guarantees atomic serialized writes. Read replicas keep query response times under 15ms.
4. Invalidation Strategies: Cost & Operational Evaluation
Section titled “4. Invalidation Strategies: Cost & Operational Evaluation”Clients vary in scale, traffic volume, and commercial tiers. SiteSwarm supports two primary strategies and a hybrid synthesis, governed in swarm.config.ts:
┌────────────────────────────────────────────────────────────────────────┐│ Cache Invalidation Trade-off Matrix │├─────────────────────────┬───────────────────┬──────────────────────────┤│ Dimension │ Strategy 1: SWR │ Strategy 2: Tag Purge ││ │ (Periodic / Free) │ (Instant / Platform) │├─────────────────────────┼───────────────────┼──────────────────────────┤│ Propagation Latency │ 60s – 300s window │ < 150ms Global Purge ││ Mobile Emergency Alerts │ ⚠️ Delayed (~60s) │ 🟢 Instant (< 2s total) ││ Cloudflare API Calls │ 0 calls (Free) │ 1 API call per publish ││ Worker Invocations │ Higher (Periodic) │ Lowest (>99% Edge Hits) ││ Plan Requirement │ Cloudflare Free │ Workers Paid / Enterprise││ Setup Complexity │ Zero config │ Service Binding to Purge ││ Ideal For │ Low-traffic tiers │ Standard & High-Traffic │└─────────────────────────┴───────────────────┴──────────────────────────┘4.1 Strategy 1: swr-periodic (Low Cache Time / Zero API Calls)
Section titled “4.1 Strategy 1: swr-periodic (Low Cache Time / Zero API Calls)”- Mechanics: Uses standard HTTP headers:
Cache-Control: public, max-age=0, s-maxage=60, stale-while-revalidate=300
- Trade-offs:
- Pros: Zero Cloudflare API tokens required; works on Cloudflare Free tier; zero external API failure modes.
- Cons: Every 60 seconds, an edge node expires its cache and invokes the edge worker, increasing worker invocations across 330+ PoPs. Content updates take up to 60 seconds to propagate to all visitors.
- Best Suited For: Low-budget, simple client websites where content rarely changes and 60-second propagation is acceptable.
4.2 Strategy 2: tag-purge (Long Cache Time / Instant Eviction)
Section titled “4.2 Strategy 2: tag-purge (Long Cache Time / Instant Eviction)”- Mechanics: Uses long edge TTLs with event-driven surrogate key purges:
Cache-Control: public, max-age=0, s-maxage=86400, stale-while-revalidate=60Cache-Tag: tenant:green-leaf-bakery
- Trade-offs:
- Pros: Sub-2-second end-to-end freshness; edge hit rate exceeds 99%; minimum worker invocations; ideal for instant emergency alerts and sold-out notifications.
- Cons: Requires Cloudflare API purge tokens and the platform purge capability.
- Best Suited For: Core SiteSwarm client applications on standard and growth retainers.
4.3 Strategy 3: hybrid (Conservative TTL + Tag Purge)
Section titled “4.3 Strategy 3: hybrid (Conservative TTL + Tag Purge)”- Mechanics: Uses moderate TTL (e.g.
s-maxage=3600/ 1 hour) with SWR=60 and triggers aCache-Tagpurge on CMS publish. - Benefits: Combines the instant eviction of tag purging with automatic periodic freshness safety in the event of an API purge failure.
5. Centralized Platform Purge Service Architecture (@siteswarm/service-cache-purge)
Section titled “5. Centralized Platform Purge Service Architecture (@siteswarm/service-cache-purge)”To support instant Cache-Tag purging across dozens of client websites without scattering raw Cloudflare API tokens across client repositories, SiteSwarm centralizes all purge operations into a dedicated platform worker:
flowchart TD subgraph ClientAWorker["Client App Worker (apps/bakery)"] A1["Worker B: EmDash CMS Engine"] -->|D1 Write Confirmed| A2["Call Purge Bridge"] A2 -->|Service Binding: env.CACHE_PURGE_SERVICE\npurgeTags('green-leaf-bakery', ['tenant:green-leaf-bakery'])| S1 end
subgraph PlatformPurge["Centralized Platform Service (@siteswarm/service-cache-purge)"] direction TB S1["Service Ingress\n(Tenant Context Verified)"] S2["Rate Limiter & Audit Logger"] S3["Cloudflare API Token Vault\n(CLOUDFLARE_API_TOKEN, ZONE_ID)"] S4["Cloudflare REST API Dispatcher\n(POST /zones/:id/purge_cache)"]
S1 --> S2 --> S3 --> S4 end
subgraph CloudflareEdge["Cloudflare Anycast Global Edge"] CF_API["Cloudflare Purge API Endpoint"] PoPs["330+ Global Edge Cache PoPs"]
S4 -->|Secure HTTPS| CF_API CF_API -->|Invalidate Tags (<150ms)| PoPs end5.1 Key Architectural Guarantees:
Section titled “5.1 Key Architectural Guarantees:”- Zero Secret Leakage:
CLOUDFLARE_API_TOKENandZONE_IDare configured strictly inside@siteswarm/service-cache-purge. Client apps (apps/*) and their PR previews have zero access to Cloudflare API tokens. - 0ms In-Process Invocation: Communication from the client CMS worker to the purge service occurs via Cloudflare Service Bindings, executing in 0ms network latency within the same V8 isolate.
- Auditing & Rate Limiting: The platform service logs every purge event with tenant ID, timestamp, and duration, preventing rogue client scripts from exceeding Cloudflare API rate limits.
- Graceful Soft-Fail Invariant: If the Cloudflare Purge API returns an error or rate limit, the purge service logs the incident and returns
{ success: false, fallback: "swr" }. The CMS publish flow does not roll back or fail the user’s edit; the page naturally revalidates within the SWR window.
6. Simple Tenant-Only Tagging Taxonomy
Section titled “6. Simple Tenant-Only Tagging Taxonomy”Surrogate keys standardise on Simple Tenant-Only Tagging:
Cache-Tag: tenant:<tenant_slug>6.1 Why Tenant-Only Tagging is Optimal:
Section titled “6.1 Why Tenant-Only Tagging is Optimal:”- Small Business Surface: A typical small business website has between 5 and 20 pages (Home, Menu/Services, About, Contact, Catering, Privacy).
- Zero Tag Bookkeeping: Eliminates complex systems that track which database rows or entity types exist on which pages. Developers never have to annotate templates with custom tag lists.
- Fast Global Re-warming: Purging
tenant:green-leaf-bakeryevicts all 8 pages of the bakery. The next visitor to any page warms that specific page in under 50ms, and it remains warm for 24 hours. The total compute cost to re-warm an entire small business site is negligible (<$0.0001).
7. The End-to-End Phone-to-Edge Lifecycle
Section titled “7. The End-to-End Phone-to-Edge Lifecycle”The following sequence illustrates the complete chronological journey from a business owner publishing an update on a mobile device to a global customer seeing the refreshed page:
sequenceDiagram autonumber actor Owner as Bakery Owner (iPhone) participant WorkerB as Worker B (CMS & Admin) participant D1 as Cloudflare D1 (SQLite) participant PurgeService as @siteswarm/service-cache-purge participant CFPurge as Cloudflare Cache Purge API participant EdgeAnycast as Cloudflare Edge Anycast Cache participant WorkerA as Worker A (Public Frontend) actor Visitor as Customer (Mobile Safari)
Note over Owner,WorkerB: Step 1: Mobile Mutation (Elapsed: 0ms) Owner->>WorkerB: POST /_emdash/api/content {"alert": "Sold out of sourdough!"} WorkerB->>WorkerB: Validate Payload (Zod Schema, Max 140 chars, HTML Strip)
Note over WorkerB,D1: Step 2: Atomic Database Commit (Elapsed: +45ms) WorkerB->>D1: Atomic SQL Write (UPDATE business_alerts) D1-->>WorkerB: Commit Confirmed (WAL mode)
Note over WorkerB,PurgeService: Step 3: Service Binding Purge Dispatch (Elapsed: +65ms) WorkerB->>PurgeService: env.CACHE_PURGE_SERVICE.purgeTags("green-leaf-bakery", ["tenant:green-leaf-bakery"]) PurgeService->>CFPurge: POST /zones/:id/purge_cache {"tags": ["tenant:green-leaf-bakery"]} CFPurge-->>EdgeAnycast: Invalidate tags across 330+ global PoPs (< 150ms) CFPurge-->>PurgeService: 200 OK PurgeService-->>WorkerB: 200 OK
WorkerB-->>Owner: 200 OK {"success": true, "publishedAt": "2026-10-05T07:22:15Z"} Note over Owner: Phone UI displays green confirmation: "Live in < 2 seconds!"
Note over Visitor,WorkerA: Step 4: First Global Visitor Arrives (Elapsed: +280ms) Visitor->>EdgeAnycast: GET / (Customer opens bakery.com) EdgeAnycast->>EdgeAnycast: Tag was purged -> Cache MISS EdgeAnycast->>WorkerA: Forward request to Worker A
Note over WorkerA,D1: Step 5: Shielded Revalidation (Elapsed: +305ms) WorkerA->>WorkerA: Check In-Memory Micro-Cache (Miss) WorkerA->>WorkerB: env.CMS_SERVICE.getCMSState("green-leaf-bakery") (0ms Service Binding) WorkerB->>D1: SELECT * FROM business_alerts (Read Replica) D1-->>WorkerB: Return fresh alert row WorkerB-->>WorkerA: Fresh CMS State JSON WorkerA->>WorkerA: Inject into in-memory micro-cache (10s TTL)
Note over WorkerA,EdgeAnycast: Step 6: Render Complete HTML & Re-Cache (Elapsed: +330ms) WorkerA-->>EdgeAnycast: 200 OK (Full HTML + Cache-Tag: tenant:green-leaf-bakery) EdgeAnycast->>EdgeAnycast: Store fresh HTML in warm edge cache EdgeAnycast-->>Visitor: Sub-25ms TTFB (Renders: "Sold out of sourdough!")
Note over EdgeAnycast,Visitor: Step 7: Subsequent 10,000 Visitors (Elapsed: +360ms onwards) Visitor->>EdgeAnycast: GET / (Next 10,000 customers open website) EdgeAnycast-->>Visitor: Instant Edge HIT (< 15ms TTFB | Zero Worker / D1 compute)8. D1 Read Protection: Single-Flight Promise Coalescing
Section titled “8. D1 Read Protection: Single-Flight Promise Coalescing”When an edge cache miss occurs immediately following a purge, hundreds of concurrent visitors could strike the edge simultaneously. SiteSwarm employs Single-Flight Promise Coalescing in the worker runtime:
type PromiseFactory<T> = () => Promise<T>;
const inFlightMap = new Map<string, Promise<any>>();const microCache = new Map<string, { data: any; expiresAt: number }>();
/** * Coalesces concurrent calls for the same key into a single in-flight promise * backed by an ultra-short in-memory micro-cache. */export async function fetchWithSingleFlight<T>( key: string, fetcher: PromiseFactory<T>, ttlMs = 10_000): Promise<T> { const now = Date.now();
// Layer 1: Isolate in-memory micro-cache const cached = microCache.get(key); if (cached && cached.expiresAt > now) { return cached.data as T; }
// Layer 2: Check if identical fetch is already in flight const existingPromise = inFlightMap.get(key); if (existingPromise) { return existingPromise as Promise<T>; }
// Layer 3: Initiate single flight execution const promise = (async () => { try { const result = await fetcher(); microCache.set(key, { data: result, expiresAt: Date.now() + ttlMs }); return result; } finally { inFlightMap.delete(key); } })();
inFlightMap.set(key, promise); return promise;}9. Capability Governance Contract (swarm.config.ts)
Section titled “9. Capability Governance Contract (swarm.config.ts)”Edge caching and invalidation is registered as a strongly typed horizontal platform capability:
import { defineAppConfig } from "@siteswarm/governance";
export default defineAppConfig({ appId: "green-leaf-bakery", name: "Green Leaf Bakery", capabilities: { "edge-cache": { type: "horizontal", version: "1.0.0", options: { strategy: "tag-purge", // "tag-purge" | "swr-periodic" | "hybrid" defaultTtlSeconds: 86400, // 24 hours staleWhileRevalidateSeconds: 60, }, }, "cms-bau": { type: "horizontal", version: "1.0.0", options: { allowEmergencyAlerts: true }, targets: ["src/components/HoursAndLocation.astro", "src/pages/index.astro"], }, },});10. Local Development & Test Emulation (pnpm dev)
Section titled “10. Local Development & Test Emulation (pnpm dev)”In accordance with LOCAL_DEV_AND_EMULATION_RUNTIME.md:
- Bypassed Caching: During local development with Miniflare/Wrangler, edge caching is bypassed (
Cache-Control: no-cache, no-store). Edits in the local EmDash studio reflect immediately upon browser refresh. - Mock Purge Service:
@siteswarm/service-cache-purgeoperates in mock mode locally, logging purge events to the console ([CachePurgeMock] Purged tags: ["tenant:green-leaf-bakery"]) without requiring real Cloudflare API credentials.
11. Empirical Verification & Benchmarks (Bakery CMS Spike)
Section titled “11. Empirical Verification & Benchmarks (Bakery CMS Spike)”| Metric | Target | Measured Empirical Result | Status |
|---|---|---|---|
| Edge Cache Hit TTFB | $< 30$ms | 12ms – 18ms | 🟢 Passed |
| Worker In-Memory Hit | $< 50$ms | 21ms – 27ms | 🟢 Passed |
| Cold Cache Miss with D1 Read | $< 150$ms | 78ms – 112ms | 🟢 Passed |
| Global Cache-Tag Purge Latency | $< 500$ms | 85ms – 140ms | 🟢 Passed |
| Phone-to-Visitor Propagation | $< 2,000$ms | 280ms – 420ms | 🟢 Passed |
| Cache Hit Ratio (Normal Traffic) | $> 95%$ | 98.7% | 🟢 Passed |
| Cache Hit Ratio (1,000 req/s Spike) | $> 99%$ | 99.6% | 🟢 Passed |
| SQLite Connection Errors under Load | 0 errors | 0 errors (1 D1 query per burst) | 🟢 Passed |
12. Implementation Roadmap & Sub-Tickets
Section titled “12. Implementation Roadmap & Sub-Tickets”The content invalidation and cache freshness model will be rolled out across the following sequenced sub-tickets under Epic #38:
flowchart LR T1["Sub-Ticket 38.1: Governance Contract\n(edge-cache in @siteswarm/governance)"] --> T2["Sub-Ticket 38.2: Single-Flight Coalescing\n(@siteswarm/capability-edge-cache)"] T2 --> T3["Sub-Ticket 38.3: Platform Purge Service\n(@siteswarm/service-cache-purge)"] T3 --> T4["Sub-Ticket 38.4: Client App Wiring\n(apps/bakery Cache-Tag & service binding)"]feat(governance): add edge-cache capability definition and schemas: Registeredge-cachecapability withstrategy,defaultTtlSeconds, andstaleWhileRevalidateSecondsin@siteswarm/governance.feat(edge-cache): author single-flight promise coalescing package: ImplementfetchWithSingleFlightutility in@siteswarm/capability-edge-cachewith concurrency tests.feat(service-cache-purge): author centralized platform purge worker: Implement Cloudflare Purge API service binding with secret isolation, auditing, and local dev mock.feat(apps): wire apps/bakery with edge-cache headers and purge triggers: Connect CMS mutations to the purge service binding and verify end-to-end phone-to-edge latency in Playwright E2E tests.