[wp-trac] [WordPress Trac] #54771: possible disagreement in the return types/values wp_cache_flush() and WP_Object_Cache:flush().
WordPress Trac
noreply at wordpress.org
Mon Jan 10 01:39:07 UTC 2022
#54771: possible disagreement in the return types/values wp_cache_flush() and
WP_Object_Cache:flush().
--------------------------+------------------------------
Reporter: pbiron | Owner: (none)
Type: defect (bug) | Status: new
Priority: low | Milestone: Awaiting Review
Component: Cache API | Version:
Severity: normal | Resolution:
Keywords: | Focuses: docs
--------------------------+------------------------------
Comment (by SergeyBiryukov):
Replying to [ticket:54771 pbiron]:
> Is this discrepancy just a mistake, or is it because of the possibility
of an object caching plugin returning something different?
As noted above, per the discussion in comment:2:ticket:23058, it is the
latter: the core `WP_Object_Cache::flush()` method always returns `true`,
but other implementations should be able to return `false` too.
The same applies to `WP_Object_Cache::set()` and `wp_cache_set()`.
I'm open to any improvements here that could clarify this :)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54771#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list