delete() public method

Will attempt to remove specified keys from the user space cache.
public delete ( array $keys ) : boolean
$keys array Keys to uniquely identify the cached items.
return boolean `true` on successful delete, `false` otherwise.
Example #1
0
 public function testDeleteWithScope()
 {
     $adapter = new Apc(array('scope' => 'primary'));
     apc_store('primary:key1', 'test1', 60);
     apc_store('key1', 'test2', 60);
     $keys = array('key1');
     $expected = array('key1' => 'test1');
     $adapter->delete($keys);
     $result = apc_exists('key1');
     $this->assertTrue($result);
     $result = apc_exists('primary:key1');
     $this->assertFalse($result);
 }