[wp-trac] [WordPress Trac] #56605: Reconsider wp_cache_supports_group_flush implementation
WordPress Trac
noreply at wordpress.org
Mon Oct 10 18:20:41 UTC 2022
#56605: Reconsider wp_cache_supports_group_flush implementation
-------------------------------------------------+-------------------------
Reporter: johnjamesjacoby | Owner: tillkruess
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.1
Component: Cache API | Version: trunk
Severity: normal | Resolution: fixed
Keywords: 2nd-opinion changes-requested has- | Focuses:
patch has-unit-tests add-to-field-guide |
-------------------------------------------------+-------------------------
Changes (by SergeyBiryukov):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"54448" 54448]:
{{{
#!CommitTicketReference repository="" revision="54448"
Cache API: Introduce `wp_cache_supports()` function.
WordPress has recently introduced a variety of caching API improvements:
* `wp_cache_add_multiple()`
* `wp_cache_set_multiple()`
* `wp_cache_get_multiple()`
* `wp_cache_delete_multiple()`
* `wp_cache_flush_runtime()`
* `wp_cache_flush_group()`
Although WordPress core provides a compatibility layer if these functions
are missing from third-party object cache implementations, there should be
a method of checking whether the cache backend supports a particular
feature.
This commit aims to improve developer experience by allowing third-party
object cache plugins to declare a `wp_cache_supports()` function and
correctly list their supported features:
* `add_multiple`
* `set_multiple`
* `get_multiple`
* `delete_multiple`
* `flush_runtime`
* `flush_group`
Note: The `wp_cache_supports()` function replaces and supersedes the
`wp_cache_supports_group_flush()` function added earlier.
Follow-up to [47938], [47944], [52700], [52703], [52706], [52708],
[53763], [53767], [54423].
Props johnjamesjacoby, tillkruess, spacedmonkey, SergeyBiryukov.
Fixes #56605.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56605#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list