diff --git src/wp-includes/cache.php src/wp-includes/cache.php
index 7aea7e2..50ff254 100644
|
|
|
15 | 15 | * |
16 | 16 | * @global WP_Object_Cache $wp_object_cache |
17 | 17 | * |
18 | | * @param int|string $key The cache key to use for retrieval later |
19 | | * @param mixed $data The data to add to the cache store |
20 | | * @param string $group The group to add the cache to |
21 | | * @param int $expire When the cache data should be expired |
22 | | * @return bool False if cache key and group already exist, true on success |
| 18 | * @param int|string $key The cache key to use for retrieval later. |
| 19 | * @param mixed $data The data to add to the cache. |
| 20 | * @param string $group The group to add the cache to. Enables the same key to be used across groups. |
| 21 | * @param int $expire When the cache data should expire, in seconds. Default is 0 (no expiry). |
| 22 | * @return bool False if cache key and group already exist, true on success. |
23 | 23 | */ |
24 | 24 | function wp_cache_add( $key, $data, $group = '', $expire = 0 ) { |
25 | 25 | global $wp_object_cache; |
… |
… |
function wp_cache_decr( $key, $offset = 1, $group = '' ) { |
68 | 68 | * |
69 | 69 | * @global WP_Object_Cache $wp_object_cache |
70 | 70 | * |
71 | | * @param int|string $key What the contents in the cache are called |
72 | | * @param string $group Where the cache contents are grouped |
73 | | * @return bool True on successful removal, false on failure |
| 71 | * @param int|string $key What the contents in the cache are called. |
| 72 | * @param string $group Where the cache contents are grouped. |
| 73 | * @return bool True on successful removal, false on failure. |
74 | 74 | */ |
75 | 75 | function wp_cache_delete($key, $group = '') { |
76 | 76 | global $wp_object_cache; |
… |
… |
function wp_cache_flush() { |
100 | 100 | * |
101 | 101 | * @global WP_Object_Cache $wp_object_cache |
102 | 102 | * |
103 | | * @param int|string $key What the contents in the cache are called |
104 | | * @param string $group Where the cache contents are grouped |
105 | | * @param bool $force Whether to force an update of the local cache from the persistent cache (default is false) |
| 103 | * @param int|string $key The key under which the cache contents are stored. |
| 104 | * @param string $group Where the cache contents are grouped. |
| 105 | * @param bool $force Whether to force an update of the local cache from the persistent cache (default is false). |
106 | 106 | * @param bool &$found Whether key was found in the cache. Disambiguates a return of false, a storable value. |
107 | 107 | * @return bool|mixed False on failure to retrieve contents or the cache |
108 | 108 | * contents on success |
… |
… |
function wp_cache_get( $key, $group = '', $force = false, &$found = null ) { |
120 | 120 | * |
121 | 121 | * @global WP_Object_Cache $wp_object_cache |
122 | 122 | * |
123 | | * @param int|string $key The cache key to increment |
| 123 | * @param int|string $key The key for the cache contents that should be incremented. |
124 | 124 | * @param int $offset The amount by which to increment the item's value. Default is 1. |
125 | 125 | * @param string $group The group the key is in. |
126 | 126 | * @return false|int False on failure, the item's new value on success. |
… |
… |
function wp_cache_init() { |
149 | 149 | * |
150 | 150 | * @global WP_Object_Cache $wp_object_cache |
151 | 151 | * |
152 | | * @param int|string $key What to call the contents in the cache |
153 | | * @param mixed $data The contents to store in the cache |
154 | | * @param string $group Where to group the cache contents |
155 | | * @param int $expire When to expire the cache contents |
156 | | * @return bool False if not exists, true if contents were replaced |
| 152 | * @param int|string $key The key for the cache data that should be replaced. |
| 153 | * @param mixed $data The new data to store in the cache. |
| 154 | * @param string $group The group for the cache data that should be replaced. |
| 155 | * @param int $expire When to expire the cache contents, in seconds. Defaults to 0 (no expiry). |
| 156 | * @return bool False if original value does not exist, true if contents were replaced |
157 | 157 | */ |
158 | 158 | function wp_cache_replace( $key, $data, $group = '', $expire = 0 ) { |
159 | 159 | global $wp_object_cache; |
… |
… |
function wp_cache_replace( $key, $data, $group = '', $expire = 0 ) { |
164 | 164 | /** |
165 | 165 | * Saves the data to the cache. |
166 | 166 | * |
| 167 | * Differs from wp_cache_add() and wp_cache_replace() in that it will always write data. |
| 168 | * |
167 | 169 | * @since 2.0.0 |
168 | 170 | * |
169 | 171 | * @global WP_Object_Cache $wp_object_cache |
170 | 172 | * |
171 | | * @param int|string $key What to call the contents in the cache |
172 | | * @param mixed $data The contents to store in the cache |
173 | | * @param string $group Where to group the cache contents |
174 | | * @param int $expire When to expire the cache contents |
| 173 | * @param int|string $key The cache key to use for retrieval later. |
| 174 | * @param mixed $data The contents to store in the cache. |
| 175 | * @param string $group Where to group the cache contents. Enables the same key to be used across groups. |
| 176 | * @param int $expire When to expire the cache contents, in seconds. Defaults to 0 (no expiry). |
175 | 177 | * @return bool False on failure, true on success |
176 | 178 | */ |
177 | 179 | function wp_cache_set( $key, $data, $group = '', $expire = 0 ) { |