read() public méthode

Invalidates and cleans up expired items on-the-fly when found.
public read ( array $keys ) : array
$keys array Keys to uniquely identify the cached items.
Résultat array Cached values keyed by cache keys on successful read, keys which could not be read will not be included in the results array.
Exemple #1
0
 public function testIncrementWithScope()
 {
     $adapter = new File(array('scope' => 'primary'));
     $this->File->write(array('primary_key1' => 5));
     $this->File->write(array('key1' => 10));
     $expected = 6;
     $result = $adapter->increment('key1');
     $this->assertEqual($expected, $result);
     $expected = array('key1' => 6);
     $result = $adapter->read(array('key1'));
     $this->assertEqual($expected, $result);
 }