コード例 #1
0
 /**
  * {@inheritdoc}
  */
 protected function _doDelete($id)
 {
     $result = parent::_doDelete($id);
     if ($result) {
         if (is_array($id)) {
             $key = $this->_getNamespacedId($this->_setKey);
             $this->_redis->pipeline(function ($pipe) use($key, $id) {
                 foreach ($id as $value) {
                     $pipe->srem($key, $value);
                 }
             });
         } else {
             $this->_redis->srem($this->_getNamespacedId($this->_setKey), $id);
         }
     }
     return $result;
 }