read() public method

Read values from the cache. Will attempt to return an array of data containing key/value pairs of the requested data.
public read ( array $keys ) : array
$keys array Keys to uniquely identify the cached items.
return array Cached values keyed by cache keys on successful read, keys which could not be read will not be included in the results array.
Example #1
0
 public function testReadWithScope()
 {
     $adapter = new Apc(array('scope' => 'primary'));
     apc_store('primary:key1', 'test1', 60);
     apc_store('key1', 'test2', 60);
     $keys = array('key1');
     $expected = array('key1' => 'test1');
     $result = $adapter->read($keys);
     $this->assertEqual($expected, $result);
 }