delete() public méthode

Note that this is not an atomic operation when using multiple keys.
public delete ( array $keys ) : boolean
$keys array Keys to uniquely identify the cached items.
Résultat boolean `true` on successful delete, `false` otherwise.
Exemple #1
0
 public function testDeleteWithScope()
 {
     $adapter = new XCache(array('scope' => 'primary'));
     xcache_set('primary:key1', 'test1', 60);
     xcache_set('key1', 'test2', 60);
     $keys = array('key1');
     $expected = array('key1' => 'test1');
     $result = $adapter->delete($keys);
     $this->assertEqual($expected, $result);
     $result = xcache_isset('key1');
     $this->assertTrue($result);
     $result = xcache_isset('primary:key1');
     $this->assertFalse($result);
 }