function display_cached_file($identifier_url, $cache_location = './cache', $cache_extension = 'spc', $cache_class = 'SimplePie_Cache', $cache_name_function = 'md5')
{
$cache = call_user_func(array($cache_class, 'create'), $cache_location, $identifier_url, $cache_extension);
if ($file = $cache->load()) {
if (isset($file['headers']['content-type'])) {
header('Content-type:' . $file['headers']['content-type']);
} else {
header('Content-type: application/octet-stream');
}
header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 604800) . ' GMT');
// 7 days
echo $file['body'];
exit;
}
die('Cached file for ' . $identifier_url . ' cannot be found.');
}