<?php
// Cache the contents to a cache file
$cached = fopen($cachefile, 'w') or die("Can't create file");
fwrite($cached, $table);
fwrite($cached, ob_get_contents());
//file_put_contents($cachefile,$cached);
fclose($cached);
ob_end_flush(); // Send the output to the browser