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

WordPress Trac noreply at wordpress.org
Fri Mar 13 22:14:02 UTC 2015


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

Comment (by jipmoors):

 Suggestions for function name: `wp_cache_get_mutiple` or
 `wp_cache_get_batch`.

 The thing that really bugs me about implementing this is the 'default'
 group that is virtually hidden in the cache API at this point because it's
 set by default when no group is supplied.

 I think that return value should be something in line of
 `$return[$group][$key] = $value` which allows for easy identification what
 data belongs where. Also missing keys would just be missing from the
 return array.

 Though allowing for empty default group would result in 'default' as
 return group, so not a 1-on-1 expectation.

 That said.

 I am currently in the process of concepting a WP_Cache_Control handler on
 which Handlers can be registered. This would make it possible to have
 cache fallbacks/fallthrough and no longer have the need for
 `wp_using_ext_object_cache`.

 Note: this concept will remove the need for the
 `_wp_cache_compat_get_multi`.

 Will post a patch on #22661 in the near future.

 Voting for putting this on the Cache API instead of Options, Meta APIs.

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


More information about the wp-trac mailing list