Esempio n. 1
0
 public function testCacheXcacheFlush()
 {
     $frontCache = new Phalcon\Cache\Frontend\Data(array('lifetime' => 10));
     // Xcache
     $ready = $this->_prepareXcache();
     if (!$ready) {
         return false;
     }
     $cache = new Phalcon\Cache\Backend\Xcache($frontCache, array('statsKey' => '_PHCM'));
     $cache->save('data', "1");
     $cache->save('data2', "2");
     $this->assertTrue($cache->flush());
     $this->assertFalse($cache->exists('data'));
     $this->assertFalse($cache->exists('data2'));
 }