src/Assistant.php
private function _getItemsByTag($tag)
    {
        $key = $this->normalizeTagForKey($tag);

        $result = $this->manager->get($key);
        // 缓存没有或者过期
        if (is_null($result)) {
            try {
                $result = Entity::where('key', '=', $key)->value('items');
            } catch (\Exception $e) {
                if ($this->manager->debug()) {
                    throw $e;
                } else {
                    $logger = $this->manager->logger();
                    if ($logger) {
                        $logger->warning($e->getMessage(), ['tag' => $tag, 'key' => $key]);
                    }
                }
            }
        }

        return is_null($result) ? [] : $result;
    }
private function _getItemsByTag($tag)
    {
        $key = $this->normalizeTagForKey($tag);

        $result = $this->manager->get($key);
        // 缓存没有或者过期
        if (is_null($result)) {
            try {
                $result = Entity::where('key', '=', $key)->value('items');
            } catch (\Exception $e) {
                if ($this->manager->debug()) {
                    throw $e;
                } else {
                    $logger = $this->manager->logger();
                    if ($logger) {
                        $logger->warning($e->getMessage(), ['tag' => $tag, 'key' => $key]);
                    }
                }
            }
        }

        return is_null($result) ? [] : $result;
    }
获取缓存key.

@param string $tag 标签

@return array