public function testToArray() { $values = $this->set->toArray(); $this->assertEquals(array(), $values); $this->rediska->addToSortedSet('test', 123, 1); $values = $this->set->toArray(); $this->assertEquals(array(123), $values); }
/** * Get queues cache. Fetches data from redis on first call. * * @return array */ protected function _getQueuesCache() { if ($this->_queuesCache === null) { $this->_queuesCache = $this->_queuesSet->toArray(); } return $this->_queuesCache; }
/** * Get an array of all available queues * * Not all adapters support getQueues(), use isSupported('getQueues') * to determine if the adapter supports this feature. * * @return array */ public function getQueues() { return $this->_queues->toArray(); }
print_r($arr); } else { var_dump($arr); } echo "\n"; echo "</xmp>"; die; } include_once 'Rediska/Key/Set.php'; $key = 'test'; $Set = new Rediska_Key_Set($key); $Set->add('a'); $Set->add('b'); $Set->add('b'); $Set->add('a'); prd($Set->toArray()); die; require_once dirname(dirname(__FILE__)) . '/EventCache.php'; require_once dirname(dirname(__FILE__)) . '/EventCacheInst.php'; $E = new EventCacheInst(array('app' => 'testapp', 'trackEvents' => false, 'adapter' => 'EventCacheAdapterApc')); #$E->flush(); // //$E->delete('test'); //$lijst = $E->read('test'); //if (empty($lijst)) { // $lijst = array(); //} //$lijst[] = 'test'; //$E->write('test', $lijst); //prd($E->read('test')); apc_clear_cache('user');