WP_Object_Cache::flush() WordPress Method

The WP_Object_Cache::flush() method is used to clear the object cache. This is useful when you need to clear the cache for all objects, or when you need to clear the cache for a specific object.

WP_Object_Cache::flush() #

Clears the object cache of all data.


Return

(true) Always returns true.


Top ↑

Source

File: wp-includes/class-wp-object-cache.php

	public function flush() {
		$this->cache = array();

		return true;
	}


Top ↑

Changelog

Changelog
VersionDescription
2.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.