Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



wp_cache_replace ›

Seit2.0.0
Veraltetn/v
wp_cache_replace ( $key, $data, $group = '', $expire = 0 )
Parameter: (4)
  • (int|string) $key The key for the cache data that should be replaced.
    Erforderlich: Ja
  • (mixed) $data The new data to store in the cache.
    Erforderlich: Ja
  • (string) $group Optional. The group for the cache data that should be replaced. Default empty.
    Erforderlich: Nein
    Standard: (leer)
  • (int) $expire Optional. When to expire the cache contents, in seconds. Default 0 (no expiration).
    Erforderlich: Nein
    Standard:
Siehe:
  • WP_Object_Cache::replace()
Gibt zurück:
  • (bool) False if original value does not exist, true if contents were replaced
Definiert in:
Codex:

Replaces the contents of the cache with new data.



Quellcode

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

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