[wp-trac] [WordPress Trac] #64370: Response header detection in page cache test for Site Health should be more robust

WordPress Trac noreply at wordpress.org
Sat Dec 6 01:43:50 UTC 2025


#64370: Response header detection in page cache test for Site Health should be more
robust
-------------------------+-------------------------
 Reporter:  westonruter  |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  7.0
Component:  Site Health  |    Version:  6.1
 Severity:  normal       |   Keywords:  needs-patch
  Focuses:  performance  |
-------------------------+-------------------------
 This is a follow-up to #63748. See [https://github.com/WordPress
 /wordpress-develop/pull/10598#pullrequestreview-3546622057 PR comment]
 from @dmsnell:

 > I wish that the `$cache_hit_callback` were more robust than it is, since
 it also matches on values like “this cache is *hit, don’t use it” and “not
 a hit” but that’s not part of this ticket or work.
 >
 > would be awesome to have some example strings from each of these new
 headers as a comment to the right of them.
 >
 > for example, the [https://www.varnish-software.com/developers/tutorials
 /logging-cache-hits-misses-varnish/ varnish docs] suggest that the _full_
 match is `hit`, meaning we could add `=> static function ( $v ) { return
 'hit' === $v; } /** @see https://www.varnish-
 software.com/developers/tutorials/logging-cache-hits-misses-varnish/ */`
 >
 > the extra examples are icing on the cake and not necessary here.
 >
 > according to [https://webtechsurvey.com/response-header/x-cache-status
 this random survey] `x-cache-status` is expected to only contain `hit`,
 though [https://webtechsurvey.com/response-header/x-cache for x-cache]
 there is an insignificant but measureable count of requests containing
 `HIT, MISS`

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64370>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list