public function get_cached_filesizes($max_age = WEEK_IN_SECONDS)
{
$cache = PATH::get_path() . '/.files';
$files = false;
if (file_exists($cache)) {
// If the file is old then regenerate it
if (time() - filemtime($cache) <= $max_age) {
$files = json_decode(gzuncompress(file_get_contents($cache)), 'ARRAY_A');
}
}
return $files;
}