Пример #1
0
 /**
  * Remove an ID from an index
  * @param  string $id
  * @param  string $index
  * @return void
  */
 protected function removeIndexId(string $id, string $index)
 {
     if ($this->redis->scard($index) == 1) {
         return $this->redis->del($index);
     }
     return $this->redis->srem($index, $id);
 }
Пример #2
0
 /**
  * {@inheritDoc}
  */
 public function scard($key)
 {
     return $this->predis->scard($key);
 }