|
|
@@ -209,11 +209,11 @@ class Cache {
|
|
|
*
|
|
|
* Writing to the active cache config:
|
|
|
*
|
|
|
- * `Cache::writeMany(array('cached_data_1' => 'data 1', 'cached_data_2' => 'data 2'));`
|
|
|
+ * `Cache::writeMany(['cached_data_1' => 'data 1', 'cached_data_2' => 'data 2']);`
|
|
|
*
|
|
|
* Writing to a specific cache config:
|
|
|
*
|
|
|
- * `Cache::writeMany(array('cached_data_1' => 'data 1', 'cached_data_2' => 'data 2'), 'long_term');`
|
|
|
+ * `Cache::writeMany(['cached_data_1' => 'data 1', 'cached_data_2' => 'data 2'], 'long_term');`
|
|
|
*
|
|
|
* @param array $data An array of data to be stored in the cache
|
|
|
* @param string $config Optional string configuration name to write to. Defaults to 'default'
|
|
|
@@ -273,11 +273,11 @@ class Cache {
|
|
|
*
|
|
|
* Reading multiple keys from the active cache configuration.
|
|
|
*
|
|
|
- * `Cache::readMany(array('my_data_1', 'my_data_2)));`
|
|
|
+ * `Cache::readMany(['my_data_1', 'my_data_2]);`
|
|
|
*
|
|
|
* Reading from a specific cache configuration.
|
|
|
*
|
|
|
- * `Cache::readMany(array('my_data_1', 'my_data_2), 'long_term');`
|
|
|
+ * `Cache::readMany(['my_data_1', 'my_data_2], 'long_term');`
|
|
|
*
|
|
|
* @param array $keys an array of keys to fetch from the cache
|
|
|
* @param string $config optional name of the configuration to use. Defaults to 'default'
|
|
|
@@ -292,6 +292,7 @@ class Cache {
|
|
|
|
|
|
return $engine->readMany($keys);
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* Increment a number under the key and return incremented value.
|
|
|
*
|
|
|
@@ -361,11 +362,11 @@ class Cache {
|
|
|
*
|
|
|
* Deleting multiple keys from the active cache configuration.
|
|
|
*
|
|
|
- * `Cache::deleteMany(array('my_data_1', 'my_data_2'));`
|
|
|
+ * `Cache::deleteMany(['my_data_1', 'my_data_2']);`
|
|
|
*
|
|
|
* Deleting from a specific cache configuration.
|
|
|
*
|
|
|
- * `Cache::deleteMany(array('my_data_1', 'my_data_2), 'long_term');`
|
|
|
+ * `Cache::deleteMany(['my_data_1', 'my_data_2], 'long_term');`
|
|
|
*
|
|
|
* @param array $keys Array of cache keys to be deleted
|
|
|
* @param string $config name of the configuration to use. Defaults to 'default'
|
|
|
@@ -417,9 +418,9 @@ class Cache {
|
|
|
* Retrieve group names to config mapping.
|
|
|
*
|
|
|
* {{{
|
|
|
- * Cache::config('daily', ['duration' => '1 day', 'groups' => ['posts']]);
|
|
|
- * Cache::config('weekly', ['duration' => '1 week', 'groups' => ['posts', 'archive']]);
|
|
|
- * $configs = Cache::groupConfigs('posts');
|
|
|
+ * Cache::config('daily', ['duration' => '1 day', 'groups' => ['posts']]);
|
|
|
+ * Cache::config('weekly', ['duration' => '1 week', 'groups' => ['posts', 'archive']]);
|
|
|
+ * $configs = Cache::groupConfigs('posts');
|
|
|
* }}}
|
|
|
*
|
|
|
* $config will equal to `['posts' => ['daily', 'weekly']]`
|