src/Leevel/Cache/Redis.php
public function get(string $name, $defaults = false, array $option = [])
    {
        $option = $this->normalizeOptions($option);

        $data = $this->handle->get(
            $this->getCacheName($name)
        );

        if (false === $data) {
            return $defaults;
        }

        if ($option['serialize'] && is_string($data)) {
            $data = unserialize($data);
        }

        return $data;
    }
public function get(string $name, $defaults = false, array $option = [])
    {
        $option = $this->normalizeOptions($option);

        $data = $this->handle->get(
            $this->getCacheName($name)
        );

        if (false === $data) {
            return $defaults;
        }

        if ($option['serialize'] && is_string($data)) {
            $data = unserialize($data);
        }

        return $data;
    }
获取缓存.

@param string $name
@param mixed  $defaults
@param array  $option

@return mixed