Reference › Functions wp_cache_get_salted ( string $cache_key , string $group , string | string[] $salt ): mixed | false
Since 6.9.0
Source wp-includes/cache-compat.php:214Parameters Return Uses Used by Source History Retrieves cached data if valid and unchanged.
Parameters
$cache_keystring The cache key used for storage and retrieval.
$groupstring The cache group used for organizing data.
$saltstring | string[]The timestamp (or multiple timestamps if an array) indicating when the cache group(s) were last updated. Return
mixed | falseThe cached data if valid, or false if the cache does not exist or is outdated. Uses · 1 wp_cache_get() Retrieves the cache contents from the cache by key and group. Source View on Trac ↗ View on GitHub ↗
214 function wp_cache_get_salted ( $cache_key , $group , $salt ) { 215 $salt = is_array ( $salt ) ? implode ( ':' , $salt ) : $salt ; 216 $cache = wp_cache_get ( $cache_key , $group ) ; 217 218 if ( ! is_array ( $cache ) ) { 219 return false ; 220 } 221 222 if ( ! isset ( $cache [ 'salt' ] ) || ! isset ( $cache [ 'data' ] ) || $salt !== $cache [ 'salt' ] ) { 223 return false ; 224 } 225 226 return $cache [ 'data' ] ; 227 } History Introduced in 6.9.0 . Unchanged from 6.9.7 through 7.1.0.
6.9.7 7.0.4 7.1.0 Signature, return type and hooks compared across 3 parsed releases.
About this page Parsed data Generated from the wordpress-develop 7.1.0 tag, from src/wp-includes/cache-compat.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. Corrections Something wrong on this page? Report it and it gets fixed in the next regeneration.