Nette\Loaders\RobotLoader::saveCache PHP Method

saveCache() private method

Writes class list to cache.
private saveCache ( ) : void
return void
    private function saveCache()
    {
        $file = $this->getCacheFile();
        $code = "<?php\nreturn " . var_export($this->classes, TRUE) . ";\n";
        if (file_put_contents("{$file}.tmp", $code) !== strlen($code) || !rename("{$file}.tmp", $file)) {
            @unlink("{$file}.tmp");
            // @ - file may not exist
            throw new \RuntimeException("Unable to create '{$file}'.");
        }
        if (function_exists('opcache_invalidate')) {
            @opcache_invalidate($file, TRUE);
            // @ can be restricted
        }
    }