wp_cache_delete() WordPress Function

The wp_cache_delete() function is used to delete a cached object. This function takes two parameters: the key of the cached object to be deleted, and a flag to determine whether to force the deletion.

wp_cache_delete( int|string $key, string $group = '' ) #

Removes the cache contents matching key and group.


Description

Top ↑

See also


Top ↑

Parameters

$key

(int|string)(Required)What the contents in the cache are called.

$group

(string)(Optional) Where the cache contents are grouped.

Default value: ''


Top ↑

Return

(bool) True on successful removal, false on failure.


Top ↑

Source

File: wp-includes/cache.php

function wp_cache_delete( $key, $group = '' ) {
	global $wp_object_cache;

	return $wp_object_cache->delete( $key, $group );
}


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.