public function setUp() { if (!extension_loaded('redis')) { $this->markTestSkipped('The Redis extension was not loaded.'); } $this->cache = \fluxbb\cache\Cache::load('Redis', array()); }
public function setUp() { if (!extension_loaded('wincache')) { $this->markTestSkipped('The WinCache extension was not loaded.'); } $this->cache = \fluxbb\cache\Cache::load('WinCache', array()); }
public function setUp() { if (!extension_loaded('zendcache')) { $this->markTestSkipped('The ZendCache extension was not loaded.'); } $this->cache = \fluxbb\cache\Cache::load('ZendSHM', array()); }
public function setUp() { if (!extension_loaded('eaccelerator') || !function_exists('eaccelerator_put')) { $this->markTestSkipped('The eAccelerator extension was not loaded.'); } $this->cache = \fluxbb\cache\Cache::load('eAccelerator', array()); }
public function setUp() { if (!extension_loaded('memcached')) { $this->markTestSkipped('The Memcached extension was not loaded.'); } $this->cache = \fluxbb\cache\Cache::load('Memcached', array()); }
public function get($key) { $data = parent::get($key); if ($data === self::NOT_FOUND) { return self::NOT_FOUND; } // Check if the data has expired if ($data['expire'] > 0 && $data['expire'] < time()) { $this->delete($key); // Correct the hit/miss counts $this->hits--; $this->misses++; return self::NOT_FOUND; } return $data['data']; }
public function setUp() { $this->cache = \fluxbb\cache\Cache::load('File', array('dir' => '/tmp/fluxbb-cache')); }