wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



wp_cache_add › WordPress Function

Da2.0.0
Deprecaton/a
wp_cache_add ( $key, $data, $group = '', $expire = 0 )
Parametri: (4)
  • (int|string) $key The cache key to use for retrieval later.
    Richiesto:
  • (mixed) $data The data to add to the cache.
    Richiesto:
  • (string) $group Optional. The group to add the cache to. Enables the same key to be used across groups. Default empty.
    Richiesto: No
    Default: (vuoto)
  • (int) $expire Optional. When the cache data should expire, in seconds. Default 0 (no expiration).
    Richiesto: No
    Default:
Vedi:
  • WP_Object_Cache::add()
Ritorna:
  • (bool) True on success, false if cache key and group already exist.
Definito a:
Codex:

Adds data to the cache, if the cache key doesn't already exist.



Sorgenti

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

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