YiiRedis
YiiRedis copied to clipboard
ARadisList getCount()
public function getCount() {
if ($this->_count === null) {
if ($this->name === null) {
throw new CException(get_class($this)." requires a name!");
}
$this->_count = (int) $this->getConnection()->getClient()->lSize($this->name);
}
return $this->_count;
}
lSize does not work
but work this: $rconn = Yii::app()->redis->getClient(); $llen_f = $rconn->llen($redis_key);
Hey, which version of phpredis are you using?
v.2.2.2
getCount() string $this->_count = $this->getConnection()->getClient()->lSize($this->name); return: Redis Object ( [socket] => Resource id #17 )