[wp-trac] [WordPress Trac] #33276: redundant wp_using_ext_object_cache check in get/set_transient

WordPress Trac noreply at wordpress.org
Tue Mar 29 01:29:11 UTC 2016


#33276: redundant wp_using_ext_object_cache check in get/set_transient
--------------------------+------------------------------
 Reporter:  shmulikk      |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Cache API     |     Version:  2.8
 Severity:  normal        |  Resolution:
 Keywords:  2nd-opinion   |     Focuses:  performance
--------------------------+------------------------------

Comment (by dd32):

 For an explanation of why this logic exists:

 When you're using an external cache, all options ultimately get stored in
 an `alloptions` cache, which on large sites will exceed the storage limits
 once transients are added (for example, Memcache is 1MB by default).

 As transients are transient, all code that uses them should expect the
 transient to expire in as little as `instantly`.

 So; Removing the object cache checks within `get/set_transient()` isn't
 going to be possible, however, fixing it to detect a cache failure
 (`wp_cache_set()` returning false perhaps?) is a potential enhancement we
 can look at here.

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


More information about the wp-trac mailing list