clean() public static method

Perform garbage collection on specified cache configuration. All invalidated cache keys - *without* honoring a configured scope - from the specified configuration are removed.
public static clean ( string $name ) : boolean
$name string The cache configuration to be cleaned.
return boolean `true` on successful cleaning, `false` if failed partially or entirely.
Esempio n. 1
0
 public function testClean()
 {
     $config = array('default' => array('adapter' => 'Memory', 'filters' => array()));
     Cache::config($config);
     $result = Cache::config();
     $expected = $config;
     $this->assertEqual($expected, $result);
     $result = Cache::clean('non_existing');
     $this->assertFalse($result);
     $result = Cache::clean('default');
     $this->assertFalse($result);
 }