[wp-trac] [WordPress Trac] #64553: Add parameter to delete_expired_transients() for custom transients

WordPress Trac noreply at wordpress.org
Mon Jan 26 11:50:02 UTC 2026


#64553: Add parameter to delete_expired_transients() for custom transients
-----------------------------+-----------------------------
 Reporter:  Guido07111975    |      Owner:  (none)
     Type:  feature request  |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Database         |    Version:  6.9
 Severity:  normal           |   Keywords:
  Focuses:                   |
-----------------------------+-----------------------------
 I hereby suggest adding an extra parameter to the
 [https://developer.wordpress.org/reference/functions/delete_expired_transients/
 delete_expired_transients()] function, so dev is able to only force delete
 its own (custom) expired transients. By adding the transient name or its
 unique prefix to the function, like:
 {{{
 delete_expired_transients( $force_db = false, $name = false ) {
 }}}
 It seems to be something that can be added easily in file wp-
 includes/option.php.

 IMO a plugin/theme should be able to delete its own data, but it should
 not delete data (expired transients) that are not related to the
 plugin/theme.

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


More information about the wp-trac mailing list