Skip to content

Instantly share code, notes, and snippets.

View jbouganim's full-sized avatar

Jonathan Bouganim jbouganim

  • Team51 @ Automattic
  • Toronto, ON
View GitHub Profile
@jbouganim
jbouganim / gist:851f22b4fc1394b36c1261146edf0b43
Created April 21, 2026 17:21
Batcache fork with CDN-simulation test mode
<?php
/**
* Batcache (customized) — WordPress page cache drop-in that simulates a CDN edge.
*
* This is a modified fork of Automattic's Batcache. On top of the usual full-page object-cache
* storage, it layers a "test_mode" that makes the local site behave like a real CDN (Cloudflare,
* Fastly, etc.) so plugin/theme cacheability can be validated end-to-end without deploying
* anywhere.
*
* ---------------------------------------------------------------------------