[wp-trac] [WordPress Trac] #20316: Garbage collect transients

WordPress Trac noreply at wordpress.org
Mon May 6 08:06:12 UTC 2013


#20316: Garbage collect transients
----------------------------------------------+----------------------------
 Reporter:  nacin                             |       Owner:
     Type:  enhancement                       |      Status:  new
 Priority:  normal                            |   Milestone:  Future
Component:  Database                          |  Release
 Severity:  normal                            |     Version:
 Keywords:  dev-feedback has-patch 3.7-early  |  Resolution:
----------------------------------------------+----------------------------

Comment (by dartiss):

 Replying to [comment:23 nacin]:
 > Expired transients should probably be removed using either
 delete_option() — akin to how get_transient() removes an expired
 transient, rather than announcing it with delete_transient()'s hooks — or
 since we are already doing straight database calls, with a DELETE. I don't
 think there is a need to do this noisily. It's kind of like something
 silently vanishing from a cache backend.

 I totally agree. I was using a simple selection of the transient by SQL in
 my plugin but using delete_transient to then remove them - amongst other
 things this isn't very efficient at removing large numbers of un-housekeep
 transients. I'm coding a change this week to replace it with a single SQL
 to achieve it.

 David.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20316#comment:25>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list