Пример #1
0
 function open($path, $name)
 {
     if (Config::getInstance()->is_debug()) {
         $message = sprintf("session_open : path=%s ,name %s", $path, $name);
         Logger::getInstance()->debug($message);
     }
     $this->redis = Redis::getInstance()->connection();
     $this->session_name = $name;
     return TRUE;
 }
Пример #2
0
 function getPagedZSet($key, $paginator)
 {
     // get start/end using paginator
     $pageNo = $paginator->getPageNo();
     $pageSize = $paginator->getPageSize();
     $start = ($pageNo - 1) * $pageSize;
     $end = $start + $pageSize - 1;
     $redis = Redis::getInstance()->connection();
     $members = $redis->zrevrange($key, $start, $end, "withscores");
     return $members;
 }