Skip to content
W
Sign in

Caching

WBengine provides data caching and a page cache for eligible public requests. Measure the real deployment before changing cache drivers or lifetimes.

Data and page caches

The data cache avoids repeating selected reads. The page cache stores eligible visitor-independent responses, separated by locale. Authenticated or request-specific output must not enter a shared public cache. Cache eligibility and invalidation are enforced by the framework.

For the demo, page caching is configured in src/Config/settings.json.default. Set a short TTL while editing. Clear cache after content or configuration changes; the API cache-flush endpoint requires an administrator token.

Read-only diagnostics

The CLI can inspect configuration, deployment readiness, and migration state without running database DDL:

vendor/bin/wbengine.php config:check --config=src/Config/Settings.json --root=src
vendor/bin/wbengine.php doctor --config=src/Config/Settings.json --root=src
vendor/bin/wbengine.php migration:status --config=src/Config/Settings.json --root=src

CLI and web workers can use different PHP settings and filesystem permissions. Compare their OPcache and writable-directory configuration when results differ.

Live on this request

When was this page built?

The time below is taken when the boxes run. With the page cache on, reloading shows the same time until the copy expires, and the query count stays at what the first visit cost.

Built at
02:04:39
SQL queries
3
Build time
3.9 ms
  • Data cache: file
  • Page cache: on, 60 s
X-WBengine-Cache: - HIT means the stored copy was served.