public function setUp($notag = false) { $this->_instance = new Cm_Cache_Backend_Redis(array('server' => '127.0.0.1', 'port' => '6379', 'database' => '1', 'notMatchingTags' => TRUE, 'force_standalone' => $this->forceStandalone, 'compress_threshold' => 100, 'compression_lib' => 'gzip', 'use_lua' => TRUE, 'lua_max_c_stack' => self::LUA_MAX_C_STACK)); $this->_instance->clean(Zend_Cache::CLEANING_MODE_ALL); $this->_instance->___scriptFlush(); parent::setUp($notag); }
public function setUp($notag = true) { $serverValid = array('host' => TESTS_ZEND_CACHE_LIBMEMCACHED_HOST, 'port' => TESTS_ZEND_CACHE_LIBMEMCACHED_PORT, 'weight' => TESTS_ZEND_CACHE_LIBMEMCACHED_WEIGHT); $options = array('servers' => array($serverValid), 'client' => array('no_block' => false, Memcached::OPT_TCP_NODELAY => false)); $this->_instance = new Zend_Cache_Backend_Libmemcached($options); parent::setUp($notag); }
public function setUp($notag = true) { $server = array('host' => TESTS_ZEND_CACHE_MEMCACHED_HOST, 'port' => TESTS_ZEND_CACHE_MEMCACHED_PORT, 'persistent' => TESTS_ZEND_CACHE_MEMCACHED_PERSISTENT); $options = array('servers' => array(0 => $server)); $this->_instance = new Zend_Cache_Backend_Memcached($options); parent::setUp($notag); }
public function setUp($notag = false) { $this->mkdir(); $this->_cache_dir = $this->getTmpDir() . DIRECTORY_SEPARATOR; $this->_instance = new Zend_Cache_Backend_File(array('cache_dir' => $this->_cache_dir)); $logger = new Zend_Log(new Zend_Log_Writer_Null()); $this->_instance->setDirectives(array('logger' => $logger)); parent::setUp($notag); }
public function testRemoveCorrectCallWithVacuum() { $this->_instance = new Zend_Cache_Backend_Sqlite(array('cache_db_complete_path' => $this->_cache_dir . 'cache.db', 'automatic_vacuum_factor' => 1)); parent::setUp(); $this->assertTrue($this->_instance->remove('bar')); $this->assertFalse($this->_instance->test('bar')); $this->assertFalse($this->_instance->remove('barbar')); $this->assertFalse($this->_instance->test('barbar')); }
public function setUp($notag = false) { @mkdir($this->getTmpDir()); $this->_cache_dir = $this->getTmpDir() . DIRECTORY_SEPARATOR; $slowBackend = 'File'; $fastBackend = 'Apc'; $slowBackendOptions = array('cache_dir' => $this->_cache_dir); $fastBackendOptions = array(); $this->_instance = new Zend_Cache_Backend_TwoLevels(array('fast_backend' => $fastBackend, 'slow_backend' => $slowBackend, 'fast_backend_options' => $fastBackendOptions, 'slow_backend_options' => $slowBackendOptions)); parent::setUp($notag); }
public function setUp($notag = true) { if (!class_exists('Memcached')) { $this->markTestSkipped('Memcached is not installed, skipping test'); return; } $serverValid = array('host' => TESTS_ZEND_CACHE_LIBMEMCACHED_HOST, 'port' => TESTS_ZEND_CACHE_LIBMEMCACHED_PORT, 'weight' => TESTS_ZEND_CACHE_LIBMEMCACHED_WEIGHT); $options = array('servers' => array($serverValid), 'client' => array('no_block' => false, Memcached::OPT_TCP_NODELAY => false)); $this->_instance = new Zend_Cache_Backend_Libmemcached($options); parent::setUp($notag); }
public function setUp($notag = true) { if (!class_exists('Memcached')) { $this->markTestSkipped('Memcached is not installed, skipping test'); return; } $serverValid = array('host' => TESTS_ZEND_CACHE_MEMCACHED_HOST, 'port' => TESTS_ZEND_CACHE_MEMCACHED_PORT, 'persistent' => TESTS_ZEND_CACHE_MEMCACHED_PERSISTENT); $serverFail = array('host' => 'not.exist', 'port' => TESTS_ZEND_CACHE_MEMCACHED_PORT, 'persistent' => TESTS_ZEND_CACHE_MEMCACHED_PERSISTENT); $options = array('servers' => array($serverValid, $serverFail)); $this->_instance = new Zend_Cache_Backend_Memcached($options); parent::setUp($notag); }
/** * @group ZF-11640 */ public function testRemoveCorrectCallWithVacuumOnMemoryDb() { $this->_instance = new Zend_Cache_Backend_Sqlite(array('cache_db_complete_path' => ':memory:', 'automatic_vacuum_factor' => 1)); parent::setUp(); $this->assertGreaterThan(0, $this->_instance->test('bar2')); $this->assertTrue($this->_instance->remove('bar')); $this->assertFalse($this->_instance->test('bar')); $this->assertGreaterThan(0, $this->_instance->test('bar2')); }
public function setUp($notag = false) { $this->mkdir(); $this->_instance = new Cm_Cache_Backend_File(array('cache_dir' => $this->getTmpDir() . DIRECTORY_SEPARATOR)); parent::setUp($notag); }
public function setUp($notag = true) { $this->_instance = new Zend_Cache_Backend_Apc(array()); parent::setUp($notag); }