Bake settings into drop-in config file #12

Open
opened 2026-09-13 11:53:38 +00:00 by kevin.bataille · 0 comments
Owner

The drop-in (wp-content/wp-recache-cache.php) runs before WordPress loads, so it cannot read options from the DB. Today it therefore ignores cache_duration TTL and the exclusion list; staleness is only masked by purge-on-update and purge-on-exclusion-change, and TTL expiry never applies on the drop-in path.

Spec:

  • Activation and every settings save regenerate wp-content/wp-recache-config.php returning an array: cache_duration, exclude_urls, rejected_cookies (#10), separate_mobile_cache
  • The drop-in requires this file when present and enforces TTL + exclusions + cookies itself
  • Deactivation/uninstall removes the config file
The drop-in (wp-content/wp-recache-cache.php) runs before WordPress loads, so it cannot read options from the DB. Today it therefore ignores cache_duration TTL and the exclusion list; staleness is only masked by purge-on-update and purge-on-exclusion-change, and TTL expiry never applies on the drop-in path. **Spec:** - Activation and every settings save regenerate wp-content/wp-recache-config.php returning an array: cache_duration, exclude_urls, rejected_cookies (#10), separate_mobile_cache - The drop-in requires this file when present and enforces TTL + exclusions + cookies itself - Deactivation/uninstall removes the config file
kevin.bataille added the phase-1 label 2026-09-13 11:53:38 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kevin.bataille/wp-recache#12