src/Leevel/Cache/File.php
protected function isExpired(string $name, array $option): bool
    {
        $filePath = $this->getCachePath($name);

        $option['expire'] = $this->cacheTime($name, (int) $option['expire']);

        if ($option['expire'] <= 0) {
            return true;
        }

        return filemtime($filePath) + (int) $option['expire'] < time();
    }
protected function isExpired(string $name, array $option): bool
    {
        $filePath = $this->getCachePath($name);

        $option['expire'] = $this->cacheTime($name, (int) $option['expire']);

        if ($option['expire'] <= 0) {
            return true;
        }

        return filemtime($filePath) + (int) $option['expire'] < time();
    }
验证缓存是否过期

@param string $name
@param array  $option

@return bool