[wp-trac] [WordPress Trac] #54668: Non blocking wp-cron.php with LSAPI

WordPress Trac noreply at wordpress.org
Mon Dec 20 15:47:00 UTC 2021


#54668: Non blocking wp-cron.php with LSAPI
-------------------------+------------------------------
 Reporter:  maximej      |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Cron API     |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  needs-patch  |     Focuses:  performance
-------------------------+------------------------------

Comment (by maximej):

 Thanks @johnbillion, will do a PR soon (not familiar with the testing
 steps however).

 But before, it leads me to another point :
 With #47396 and the following changesets [45560] and [46458]
 no cache headers are sent for these "early finished requests"

 {{{#!php
 if ( ! headers_sent() ) {
   header( 'Expires: Wed, 11 Jan 1984 05:00:00 GMT' );
   header( 'Cache-Control: no-cache, must-revalidate, max-age=0' );
 }
 }}}

 But it was stated that calls to wp-cron.php are not intended to be cached,
 so why sending these headers only on that non blocking case ?
 wp-cron.php can be cached if hosted on incompatible servers.

 Do I miss something @peterwilsoncc?

 I get that
  the fastcgi_finish_request() call prevents the setting of further HTTP
 headers by caching plugins subsequently loaded.
 but no non caching headers are sent afterwards by default.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54668#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list