Outil de recherche WordPress pour les développeurs et auteurs de thèmes



wp_cache_replace ›

Depuis2.0.0
Dépréciéen/a
wp_cache_replace ( $key, $data, $group = '', $expire = 0 )
Paramètres: (4)
  • (int|string) $key The key for the cache data that should be replaced.
    Requis: Oui
  • (mixed) $data The new data to store in the cache.
    Requis: Oui
  • (string) $group Optional. The group for the cache data that should be replaced. Default empty.
    Requis: Non
    Défaut: (vide)
  • (int) $expire Optional. When to expire the cache contents, in seconds. Default 0 (no expiration).
    Requis: Non
    Défaut:
Voir:
  • WP_Object_Cache::replace()
Retourne:
  • (bool) False if original value does not exist, true if contents were replaced
Défini(e) dans:
Codex:

Replaces the contents of the cache with new data.



Source

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

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