[wp-trac] [WordPress Trac] #20875: Introduce wp_cache_get_multi()
WordPress Trac
noreply at wordpress.org
Mon Nov 25 10:58:59 UTC 2019
#20875: Introduce wp_cache_get_multi()
-------------------------------------------------+-------------------------
Reporter: nacin | Owner:
| SergeyBiryukov
Type: enhancement | Status: assigned
Priority: normal | Milestone: 5.4
Component: Cache API | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests 2nd- | Focuses:
opinion | performance
-------------------------------------------------+-------------------------
Comment (by spacedmonkey):
I have changed the patch so that format is different.
In [https://core.trac.wordpress.org/attachment/ticket/20875/20875.7.diff
20875.7.diff] there are the following changes.
- Function name change changed to `wp_cache_multiple_get`. This isn't the
best english, but it follows the pattern of having get the end like other
functions like `wp_cache_get` and `wp_remote_get`.
- Much simpler to understand api. Give a list of keys, single group. This
means a developer can only get keys from one group at at time. But in
examples of usable in core `update_meta_cache`,`update_object_term_cache`,
`_get_non_cached_ids`, only one cache group is being request anyway.
- Added `force` param, to bring inline with `wp_cache_get`
--
Ticket URL: <https://core.trac.wordpress.org/ticket/20875#comment:39>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list