[wp-trac] [WordPress Trac] #31245: Replace alloptions with a key cache

WordPress Trac noreply at wordpress.org
Sun Oct 15 12:27:34 UTC 2017


#31245: Replace alloptions with a key cache
-------------------------------------+-----------------------------
 Reporter:  rmccue                   |       Owner:  rmccue
     Type:  enhancement              |      Status:  assigned
 Priority:  normal                   |   Milestone:  Future Release
Component:  Options, Meta APIs       |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  performance
-------------------------------------+-----------------------------

Comment (by fabifott):

 1. Why not adding a `wp_cache_get_group` to retrieve all values from a
 group? This would allow the underlying cache storage to exploit the
 relational model within group data, to possibly speed up a multi fetch.
 There is currently no cache implementation I know that would profit. But
 think about a cache implementation were fetching two adjacent values in a
 single group is cheaper than fetching two values from two different
 groups.



 2. Like  @spacedmonkey said, introducing a multi-fetch here is not the
 proper way to fix the race condition. There is a much easier fix, see
 fabian-race-fix.diff . The additional condition
 `wp_using_ext_object_cache()` is necessary because the core implementation
 of the object cache is actually wrong. `wp_cache_get` should return "not
 found" whenever `$force` is true on a non-persistent cache.

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


More information about the wp-trac mailing list