public function set_cache_header($last_modified, $expiration)
{
$max_age = $expiration - $_SERVER['REQUEST_TIME'];
if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && $last_modified <= strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE'])) {
$this->set_status_header(304);
exit;
} else {
header('Pragma: public');
header('Cache-Control: max-age=' . $max_age . ', public');
header('Expires: ' . gmdate('D, d M Y H:i:s', $expiration) . ' GMT');
header('Last-modified: ' . gmdate('D, d M Y H:i:s', $last_modified) . ' GMT');
}
}