Beispiel #1
0
 public function getCount($offset = null, $count = null)
 {
     $cacheKey = array('count');
     if (($count = $this->_cacheGet($cacheKey)) === false) {
         $count = $this->_client->lLen($this->_key);
         $this->_cacheSet($cacheKey, $count);
     }
     return $count;
 }
Beispiel #2
0
 /**
  * @expectedException CM_Exception_Invalid
  * @expectedExceptionMessage does not contain a list
  */
 public function testLLenNotList()
 {
     $this->_client->zAdd('foo', 2, 'bar');
     $this->_client->lLen('foo');
 }