public function clear($tag = null) { if ($tag) { // 指定标签清除 $keys = $this->getTagItem($tag); foreach ($keys as $key) { $this->handler->delete($key); } $this->rm('tag_' . md5($tag)); return true; } return $this->handler->flushDB(); }