wp_cache_set
wp_cache_set ( $key, $data, $group = '', $expire = 0 )
Parameters:- (int|string) key The cache key to use for retrieval later.
- (mixed) data The contents to store in the cache.
- (string) group Optional. Where to group the cache contents. Enables the same key to be used across groups. Default empty.
- (int) expire Optional. When to expire the cache contents, in seconds. Default 0 (no expiration).
See:Returns:- (bool) True on success, false on failure.
Defined at: - Introduced in WordPress: 2.0.0
- Deprecated in WordPress: —
Description
Saves the data to the cache.Differs from wp_cache_add() and wp_cache_replace() in that it will always write data.