WP_Object_Cache
class WP_Object_Cache
// Constructor: function Object() { [native code] } Core class that implements an object cache.
Methods 24 methods
| Method / Return | Description |
|---|---|
| __construct() void | Sets up object properties. |
| __get() mixed | Makes private properties readable for backward compatibility.
Parameters: $name: mixed |
| __set() void | Makes private properties settable for backward compatibility.
Parameters: $name: mixed, $value: mixed |
| __isset() bool | Makes private properties checkable for backward compatibility.
Parameters: $name: mixed |
| __unset() void | Makes private properties un-settable for backward compatibility.
Parameters: $name: mixed |
| is_valid_key() bool | Serves as a utility function to determine whether a key is valid.
Parameters: $key: mixed |
| _exists() bool | Serves as a utility function to determine whether a key exists in the cache.
Parameters: $key: mixed, $group: mixed |
| add() bool | Adds data to the cache if it doesn't already exist.
Parameters: $key: mixed, $data: mixed, $group: mixed, $expire: mixed |
| add_multiple() bool[] | Adds multiple values to the cache in one call.
Parameters: $data: array, $group: mixed, $expire: mixed |
| replace() bool | Replaces the contents in the cache, if contents already exist.
Parameters: $key: mixed, $data: mixed, $group: mixed, $expire: mixed |
| set() bool | Sets the data contents into the cache.
Parameters: $key: mixed, $data: mixed, $group: mixed, $expire: mixed |
| set_multiple() bool[] | Sets multiple values to the cache in one call.
Parameters: $data: array, $group: mixed, $expire: mixed |
| get() (mixed | Retrieves the cache contents, if it exists.
Parameters: $key: mixed, $group: mixed, $force: mixed, $found: mixed |
| get_multiple() array | Retrieves multiple values from the cache in one call.
Parameters: $keys: mixed, $group: mixed, $force: mixed |
| delete() bool | Removes the contents of the cache key in the group.
Parameters: $key: mixed, $group: mixed, $deprecated: mixed |
| delete_multiple() bool[] | Deletes multiple values from the cache in one call.
Parameters: $keys: array, $group: mixed |
| incr() (int | Increments numeric cache item's value.
Parameters: $key: mixed, $offset: mixed, $group: mixed |
| decr() (int | Decrements numeric cache item's value.
Parameters: $key: mixed, $offset: mixed, $group: mixed |
| flush() true | Clears the object cache of all data. |
| flush_group() true | Removes all cache items in a group.
Parameters: $group: mixed |
| add_global_groups() void | Sets the list of global cache groups.
Parameters: $groups: mixed |
| switch_to_blog() void | Switches the internal blog ID.
Parameters: $blog_id: mixed |
| reset() void | Resets cache keys. |
| stats() void | Echoes the stats of the caching. |
Properties
| Property / Type | Description |
|---|---|
| $cache mixed public | No description available. |
| $cache_hits mixed public | No description available. |
| $cache_misses mixed public | No description available. |
| $global_groups mixed public | No description available. |
| $blog_prefix mixed public | No description available. |
| $multisite mixed public | No description available. |