/**
  * Test that clear() also removes files with group tags.
  *
  * @return void
  */
 public function testClearWithNoKeys()
 {
     $engine = new FileEngine();
     $engine->init(['prefix' => 'cake_test_', 'duration' => DAY, 'groups' => ['one', 'two']]);
     $key = 'cake_test_test_key';
     $engine->clear(false);
     $this->assertFalse($engine->read($key), 'No errors should be found');
 }
Exemple #2
0
 /**
  * testGroupConfigsWithCacheInstance method
  */
 public function testGroupConfigsWithCacheInstance()
 {
     Cache::drop('test');
     $cache = new FileEngine();
     $cache->init(['duration' => 300, 'engine' => 'File', 'groups' => ['users', 'comments']]);
     Cache::config('cached', $cache);
     $result = Cache::groupConfigs('users');
     $this->assertEquals(['users' => ['cached']], $result);
 }