private function getCache($file)
    {
        if (null === $this->cache) {
            return null;
        }

        $key = md5($file);

        // File already present
        if ($this->cache->has($key)) {
            list($mtime, $path) = unserialize($this->cache->get($key));

            if ($mtime === filemtime($file)) {
                return $path;
            }

            $delete = $this->directory.'/'.$path;
            if (file_exists($delete) && false === @unlink($delete)) {
                throw new \RuntimeException('Unable to remove file '.$delete);
            }
        }

        return null;
    }
private function getCache($file)
    {
        if (null === $this->cache) {
            return null;
        }

        $key = md5($file);

        // File already present
        if ($this->cache->has($key)) {
            list($mtime, $path) = unserialize($this->cache->get($key));

            if ($mtime === filemtime($file)) {
                return $path;
            }

            $delete = $this->directory.'/'.$path;
            if (file_exists($delete) && false === @unlink($delete)) {
                throw new \RuntimeException('Unable to remove file '.$delete);
            }
        }

        return null;
    }
private function getCache ( $ file ) { if ( null === $ this -> cache ) { return null ; } $ key = md5 ( $ file ) ; // File already present if ( $ this -> cache -> has ( $ key ) ) { list ( $ mtime , $ path ) = unserialize ( $ this -> cache -> get ( $ key ) ) ; if ( $ mtime === filemtime ( $ file ) ) { return $ path ; } $ delete = $ this -> directory . '/' . $ path ; if ( file_exists ( $ delete ) && false === @ unlink ( $ delete ) ) { throw new \ RuntimeException ( 'Unable to remove file ' . $ delete ) ; } } return null ; }
Searches a fresh cached file for the given file.

@throws RuntimeException filesystem errors
Searches a fresh cached file for the given file .