[wp-trac] [WordPress Trac] #45417: Lack of actions when wp_cache_flush is called
WordPress Trac
noreply at wordpress.org
Mon Nov 26 14:08:25 UTC 2018
#45417: Lack of actions when wp_cache_flush is called
-------------------------+-----------------------------
Reporter: k1sul1 | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Cache API | Version:
Severity: trivial | Keywords: needs-patch
Focuses: |
-------------------------+-----------------------------
The function definition of wp_cache_flush doesn't have a do_action call,
and neither does WP_Object_Cache->flush.
https://core.trac.wordpress.org/browser/tags/4.9.8/src/wp-
includes/cache.php#L97
https://core.trac.wordpress.org/browser/tags/4.9.8/src/wp-
includes/cache.php#L498
I want to be able to run additional code whenever the object cache is
flushed but currently I can't.
Fixing this should be as trivial as adding
{{{
do_action('wp_cache_flush');
}}}
to the function definition of wp_cache_flush.
I don't care about the name of the action or if it runs before or after
the flush, I'd just like to have this functionality in the core.
Preferably before WordPress 6.0.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45417>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list