[wp-trac] [WordPress Trac] #41699: Expired transients are not flushed by cron

WordPress Trac noreply at wordpress.org
Fri Aug 25 20:36:27 UTC 2017


#41699: Expired transients are not flushed by cron
--------------------------------+--------------------
 Reporter:  bor0                |       Owner:
     Type:  defect (bug)        |      Status:  new
 Priority:  normal              |   Milestone:  4.9
Component:  Options, Meta APIs  |     Version:  4.8.1
 Severity:  normal              |  Resolution:
 Keywords:  dev-feedback        |     Focuses:
--------------------------------+--------------------

Comment (by Mte90):

 Looking at the code there is already a loop of all the hooks with
 unschedule (https://github.com/WordPress/WordPress/blob/master/wp-
 cron.php#L115).
 But unschedule is used to remove in the system the scheduled hooks and not
 cleaning.

 Looking at the code in upgrade.php the query is running for a multisite
 environment but if we are running wp-cron.php we have to act on the cron
 stuff of the site that is running.

 So looking on the code of a famous wordpress plugin for clean the
 transient (https://plugins.trac.wordpress.org/browser/delete-expired-
 transients/trunk/includes/class.DelxtransCleaners.php) I made that patch
 that run the query before the `die();` of wp-cron.

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


More information about the wp-trac mailing list