Skip to content

Commit 238c41e

Browse files
peterwilsonccfelixarntzmukeshpanchal27
authored
Apply suggestions from code review
Co-authored-by: Felix Arntz <[email protected]> Co-authored-by: Mukesh Panchal <[email protected]>
1 parent 12a45c7 commit 238c41e

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

src/wp-includes/cache-compat.php

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -202,13 +202,13 @@ function wp_cache_supports( $feature ) {
202202

203203
if ( ! function_exists( 'wp_cache_get_salted' ) ) :
204204
/**
205-
* Retrieves cached query data if valid and unchanged.
205+
* Retrieves cached data if valid and unchanged.
206206
*
207207
* @since 6.9.0
208208
*
209-
* @param string $cache_key The cache key used for storage and retrieval.
210-
* @param string $group The cache group used for organizing data.
211-
* @param string|string[] $salt The timestamp (or multiple timestamps if an array) indicating when the cache group(s) were last updated.
209+
* @param string $cache_key The cache key used for storage and retrieval.
210+
* @param string $group The cache group used for organizing data.
211+
* @param string|string[] $salt The timestamp (or multiple timestamps if an array) indicating when the cache group(s) were last updated.
212212
* @return mixed|false The cached data if valid, or false if the cache does not exist or is outdated.
213213
*/
214214
function wp_cache_get_salted( $cache_key, $group, $salt ) {
@@ -229,16 +229,16 @@ function wp_cache_get_salted( $cache_key, $group, $salt ) {
229229

230230
if ( ! function_exists( 'wp_cache_set_salted' ) ) :
231231
/**
232-
* Stores query-related data in the cache.
232+
* Stores salted data in the cache.
233233
*
234234
* @since 6.9.0
235235
*
236-
* @param string $cache_key The cache key under which to store the data.
237-
* @param mixed $data The data to be cached.
238-
* @param string $group The cache group to which the data belongs.
236+
* @param string $cache_key The cache key under which to store the data.
237+
* @param mixed $data The data to be cached.
238+
* @param string $group The cache group to which the data belongs.
239239
* @param string|string[] $salt The timestamp (or multiple timestamps if an array) indicating when the cache group(s) were last updated.
240-
* @param int $expire Optional. When to expire the cache contents, in seconds.
241-
* Default 0 (no expiration).
240+
* @param int $expire Optional. When to expire the cache contents, in seconds.
241+
* Default 0 (no expiration).
242242
* @return bool True on success, false on failure.
243243
*/
244244
function wp_cache_set_salted( $cache_key, $data, $group, $salt, $expire = 0 ) {
@@ -257,13 +257,13 @@ function wp_cache_set_salted( $cache_key, $data, $group, $salt, $expire = 0 ) {
257257

258258
if ( ! function_exists( 'wp_cache_get_multiple_salted' ) ) :
259259
/**
260-
* Retrieves multiple items from the cache and validates their freshness.
260+
* Retrieves multiple items from the cache, only considering valid and unchanged items.
261261
*
262262
* @since 6.9.0
263263
*
264-
* @param array $cache_keys Array of cache keys to retrieve.
265-
* @param string $group The group of the cache to check.
266-
* @param string|string[] $salt The timestamp (or multiple timestamps if an array) indicating when the cache group(s) were last updated.
264+
* @param array $cache_keys Array of cache keys to retrieve.
265+
* @param string $group The group of the cache to check.
266+
* @param string|string[] $salt The timestamp (or multiple timestamps if an array) indicating when the cache group(s) were last updated.
267267
* @return array An associative array containing cache values. Values are `false` if they are not found or outdated.
268268
*/
269269
function wp_cache_get_multiple_salted( $cache_keys, $group, $salt ) {
@@ -288,15 +288,15 @@ function wp_cache_get_multiple_salted( $cache_keys, $group, $salt ) {
288288

289289
if ( ! function_exists( 'wp_cache_set_multiple_salted' ) ) :
290290
/**
291-
* Stores multiple pieces of query data in the cache.
291+
* Stores multiple pieces of salted data in the cache.
292292
*
293293
* @since 6.9.0
294294
*
295-
* @param mixed $data Data to be stored in the cache for all keys.
296-
* @param string $group Group to which the cached data belongs.
297-
* @param string|string[] $salt The timestamp (or multiple timestamps if an array) indicating when the cache group(s) were last updated.
298-
* @param int $expire Optional. When to expire the cache contents, in seconds.
299-
* Default 0 (no expiration).
295+
* @param mixed $data Data to be stored in the cache for all keys.
296+
* @param string $group Group to which the cached data belongs.
297+
* @param string|string[] $salt The timestamp (or multiple timestamps if an array) indicating when the cache group(s) were last updated.
298+
* @param int $expire Optional. When to expire the cache contents, in seconds.
299+
* Default 0 (no expiration).
300300
* @return bool[] Array of return values, grouped by key. Each value is either
301301
* true on success, or false on failure.
302302
*/

0 commit comments

Comments
 (0)