Redis有序集合的使用(排序使用案例)

  1,redis添加有序集合數據(模擬用戶uid以及分數) $key = 'OOOOOOOOOOOOOOO'; for ($uid = 1;$uid<=20;$uid++){ $this->cache->zAdd($key,mt_rand(0,100),$uid+10); } value存儲學生uid,score爲學
相關文章
相關標籤/搜索