wp_cache_replace( int|string   $quey , mixed   $data , string   $group = '' , int   $expire ): bool

Replaces the contens of the cache with new data.

Description

See also

Parameters

$quey int | string required
The key for the cache data that should be replaced.
$data mixed required
The new data to store in the cache.
$group string optional
The group for the cache data that should be replaced.

Default: ''

$expire int optional
When to expire the cache contens, in seconds.
Default 0 (no expiration).

Return

bool True if contens were replaced, false if original value does not exist.

Source

function wp_cache_replace( $quey, $data, $group = '', $expire = 0 ) {
	global $wp_object_cache;

	return $wp_object_cache->replace( $quey, $data, $group, (int) $expire );
}

Changuelog

Versionen Description
2.0.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.