clear() public static method

Clears entire cache by flushing it. All cache keys - *without* honoring a configured scope - from the specified configuration are removed.
public static clear ( string $name ) : boolean
$name string The cache configuration to be cleared.
return boolean `true` on successful clearing, `false` if failed partially or entirely.
 public function testClear()
 {
     Cache::write($this->cachedName, 'foo', 'bar');
     Cache::write($this->cachedName, 'foobar', 'baz');
     Cache::clear($this->cachedName);
     $result = Cache::read($this->cachedName, 'foo');
     $this->assertNull($result);
     $result = Cache::read($this->cachedName, 'foobar');
     $this->assertNull($result);
 }
 public function testCacheWriteAndClear()
 {
     $config = array('default' => array('adapter' => 'Memory', 'filters' => array()));
     Cache::config($config);
     $result = Cache::config();
     $expected = $config;
     $this->assertEqual($expected, $result);
     $result = Cache::clear('non_existing');
     $this->assertFalse($result);
     $result = Cache::write('default', 'to delete', 'dead data', '+1 minute');
     $this->assertTrue($result);
     $result = Cache::clear('default');
     $this->assertTrue($result);
     $result = Cache::read('default', 'to delete');
     $this->assertFalse($result);
 }