wp_cache_flush()
Completely clears the object cache. Deletes all items in the object cache.
Uses: WP_Object_Cache::flush()
Used By: wp_cache_flush_runtime()
1 time — 0.000088 sec (very fast) | 50000 times — 0.54 sec (very fast)
No Hooks.
Return
true|false
. True on success, false on failure.
Usage
wp_cache_flush();
Examples
#1 Clear all object cache in WordPress
wp_cache_flush();
Notes
- See: WP_Object_Cache::flush()
- Global. WP_Object_Cache. $wp_object_cache Object cache global instance.
Changelog
Since 2.0.0 | Introduced. |
wp_cache_flush() wp cache flush code WP 6.8
function wp_cache_flush() { global $wp_object_cache; return $wp_object_cache->flush(); }