Kahlan\Jit\Interceptor::cached PHP Метод

cached() публичный Метод

Gets a cached file path.
public cached ( string $file ) : string | boolean
$file string The source file path.
Результат string | boolean The cached file path or `false` if the cached file is not valid or is not cached.
    public function cached($file)
    {
        if (!($cachePath = $this->cachePath())) {
            return false;
        }
        $path = $cachePath . DS . ltrim(preg_replace('~:~', '', $file), DS);
        if (!@file_exists($path)) {
            return false;
        }
        $timestamp = filemtime($path);
        if ($timestamp > filemtime($file) && $timestamp > $this->_watchedTimestamp) {
            return $path;
        }
        return false;
    }