[wp-trac] [WordPress Trac] #54423: Add Site Health test for page caching (advanced cache)
WordPress Trac
noreply at wordpress.org
Thu Nov 11 19:20:59 UTC 2021
#54423: Add Site Health test for page caching (advanced cache)
-------------------------+-----------------------------
Reporter: westonruter | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Site Health | Version:
Severity: normal | Keywords:
Focuses: performance |
-------------------------+-----------------------------
A [https://make.wordpress.org/hosting/handbook/performance/#full-page-
cache best practice] for performance is to enable full page caching for a
WordPress site. Doing so reduces the time to first byte (TTFB) and thus
directly impacts Core Web Vitals. This is especially important on shared
hosts which have limited compute power, while also protecting a site from
going down due to traffic spikes.
As with XML Sitemaps, it may make sense for WordPress core to include a
basic full page caching solution out of the box which can be extended by
the many plugins that provide page caching today. In the meantime, there
should at least be a Site Health test with a low-severity `recommended`
status to point users to where to go to enable page caching. Since hosts
often have built-in caching solutions in place, the Site Health test
should be easily filterable so they can provide a link to their specific
dashboard or documentation to enable caching which may not be a plugin at
all but rather a reverse proxy like Varnish.
In the context of the AMP plugin for WordPress, we've already developed
such a test which could be adapted for core. See
[https://github.com/ampproject/amp-wp/pull/6456 amp-wp#6456]. It's an
async test which issues three loopback requests to the homepage, and the
test will pass if responses include either of the following headers:
1. `Cache-Control` with non-zero `max-age`.
2. `Expires` with a future time.
3. `Age` with a positive number (as is set via a proxy like Varnish).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54423>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list