wpseek.com
A WordPress-centric search engine for devs and theme authors
wp_cache_set_salted › WordPress Function
Since6.9.0
Deprecatedn/a
› wp_cache_set_salted ( $cache_key, $data, $group, $salt, $expire = 0 )
Parameters: (5) |
|
Returns: |
|
Defined at: |
|
Codex: |
Stores salted data in the cache.
Related Functions: wp_cache_get_salted, wp_cache_set_multiple_salted, wp_cache_set_multiple, wp_cache_get_multiple_salted, wp_cache_set
Source
function wp_cache_set_salted( $cache_key, $data, $group, $salt, $expire = 0 ) { $salt = is_array( $salt ) ? implode( ':', $salt ) : $salt; return wp_cache_set( $cache_key, array( 'data' => $data, 'salt' => $salt, ), $group, $expire ); } endif; if ( ! function_exists( 'wp_cache_get_multiple_salted' ) ) : /** * Retrieves multiple items from the cache, only considering valid and unchanged items. * * @since 6.9.0 * * @param array $cache_keys Array of cache keys to retrieve. * @param string $group The group of the cache to check. * @param string|string[] $salt The timestamp (or multiple timestamps if an array) indicating when the cache group(s) were last updated. * @return array An associative array containing cache values. Values are `false` if they are not found or outdated. */