[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/ -> cache-compat.php (summary)

Object Cache API functions missing from 3rd party object caches.

File Size: 201 lines (6 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 7 functions

  wp_cache_add_multiple()
  wp_cache_set_multiple()
  wp_cache_get_multiple()
  wp_cache_delete_multiple()
  wp_cache_flush_runtime()
  wp_cache_flush_group()
  wp_cache_supports()

Functions
Functions that are not part of a class:

wp_cache_add_multiple( array $data, $group = '', $expire = 0 )   X-Ref
Adds multiple values to the cache in one call, if the cache keys don't already exist.

Compat function to mimic wp_cache_add_multiple().

param: array  $data   Array of keys and values to be added.
param: string $group  Optional. Where the cache contents are grouped. Default empty.
param: int    $expire Optional. When to expire the cache contents, in seconds.
return: bool[] Array of return values, grouped by key. Each value is either

wp_cache_set_multiple( array $data, $group = '', $expire = 0 )   X-Ref
Sets multiple values to the cache in one call.

Differs from wp_cache_add_multiple() in that it will always write data.

Compat function to mimic wp_cache_set_multiple().

param: array  $data   Array of keys and values to be set.
param: string $group  Optional. Where the cache contents are grouped. Default empty.
param: int    $expire Optional. When to expire the cache contents, in seconds.
return: bool[] Array of return values, grouped by key. Each value is either

wp_cache_get_multiple( $keys, $group = '', $force = false )   X-Ref
Retrieves multiple values from the cache in one call.

Compat function to mimic wp_cache_get_multiple().

param: array  $keys  Array of keys under which the cache contents are stored.
param: string $group Optional. Where the cache contents are grouped. Default empty.
param: bool   $force Optional. Whether to force an update of the local cache
return: array Array of return values, grouped by key. Each value is either

wp_cache_delete_multiple( array $keys, $group = '' )   X-Ref
Deletes multiple values from the cache in one call.

Compat function to mimic wp_cache_delete_multiple().

param: array  $keys  Array of keys under which the cache to deleted.
param: string $group Optional. Where the cache contents are grouped. Default empty.
return: bool[] Array of return values, grouped by key. Each value is either

wp_cache_flush_runtime()   X-Ref
Removes all cache items from the in-memory runtime cache.

Compat function to mimic wp_cache_flush_runtime().

return: bool True on success, false on failure.

wp_cache_flush_group( $group )   X-Ref
Removes all cache items in a group, if the object cache implementation supports it.

Before calling this function, always check for group flushing support using the
`wp_cache_supports( 'flush_group' )` function.

param: string $group Name of group to remove from cache.
return: bool True if group was flushed, false otherwise.

wp_cache_supports( $feature )   X-Ref
Determines whether the object cache implementation supports a particular feature.

param: string $feature Name of the feature to check for. Possible values include:
return: bool True if the feature is supported, false otherwise.



Generated : Fri Apr 19 08:20:01 2024 Cross-referenced by PHPXref