Extends
lithium\core\Object
Read value(s) from the cache
Parameters
- string $key The key to uniquely identify the cached item
Returns
closure Function returning cached value if successful, `false` otherwiseSource
public function read($key) {
$connection =& $this->connection;
return function($self, $params) use (&$connection) {
$key = $params['key'];
if (is_array($key)) {
return $connection->getMultiple($key);
}
return $connection->get($key);
};
}