wp_cache_add
wp_cache_add ( $key, $data, $group = '', $expire = 0 )
Parameters:- (int|string) key The cache key to use for retrieval later.
- (mixed) data The data to add to the cache.
- (string) group Optional. The group to add the cache to. Enables the same key to be used across groups. Default empty.
- (int) expire Optional. When the cache data should expire, in seconds. Default 0 (no expiration).
See:Returns:- (bool) True on success, false if cache key and group already exist.
Defined at: - Introduced in WordPress: 2.0.0
- Deprecated in WordPress: —
Description
Adds data to the cache, if the cache key doesn't already exist.