Exemple #1
0
 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);
 }
Exemple #2
0
 /**
  * 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;
 }
Exemple #3
0
 /**
  * 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();
 }
Exemple #4
0
        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');