<?php

$cache = __DIR__.'/cache/index.xml';

if(!file_exists($cache)){
    require __DIR__.'/generator.php';
}

if(file_exists($cache)){
    header("Content-Type: application/xml; charset=utf-8");
    readfile($cache);
    exit;
}

echo '<?xml version="1.0" encoding="UTF-8"?>';
echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"></urlset>';