[wp-trac] [WordPress Trac] #22232: Setting Transient Expiration to 0 Causes Transient To Never Expire

WordPress Trac noreply at wordpress.org
Sat Oct 20 19:34:41 UTC 2012


#22232: Setting Transient Expiration to 0 Causes Transient To Never Expire
-------------------------+----------------------
 Reporter:  cgrymala     |       Owner:
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:
Component:  Cache        |     Version:  2.8
 Severity:  normal       |  Resolution:  invalid
 Keywords:               |
-------------------------+----------------------
Changes (by nacin):

 * status:  new => closed
 * resolution:   => invalid
 * milestone:  Awaiting Review =>


Comment:

 What purpose would setting a transient that expires immediately have?
 Storing a non-expiring transient *does* have its purposes.

 This is the same behavior as caching backends:
 http://us1.php.net/manual/en/function.apc-store.php,
 http://www.php.net/manual/en/memcached.expiration.php,
 http://www.php.net/manual/en/memcache.set.php. For this kind of caching, 0
 means "Store forever" (until deleted or forced out of cache) not "Don't
 store at all."

 Either way, changing this would break existing code.

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


More information about the wp-trac mailing list