wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



wp_cache_replace › WordPress Function

Od2.0.0
Przestarzałyn/a
wp_cache_replace ( $key, $data, $group = '', $expire = 0 )
Parametry: (4)
  • (int|string) $key The key for the cache data that should be replaced.
    Wymagane: Tak
  • (mixed) $data The new data to store in the cache.
    Wymagane: Tak
  • (string) $group Optional. The group for the cache data that should be replaced. Default empty.
    Wymagane: Nie
    Domyślny: (puste)
  • (int) $expire Optional. When to expire the cache contents, in seconds. Default 0 (no expiration).
    Wymagane: Nie
    Domyślny:
Zobacz:
  • WP_Object_Cache::replace()
Powrót:
  • (bool) True if contents were replaced, false if original value does not exist.
Zdefiniowane na:
Codex:

Replaces the contents of the cache with new data.



Źródło

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

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