0) { header('Last-Modified: '.gmdate('D, d M Y H:i:s T', $mod_time)); header('Expires: '.gmdate('D, d M Y H:i:s T', time() + $mod_time_diff)); header('Cache-Control: max-age='.$mod_time_diff); header('Status: 304 Not Modified', TRUE, 304); Event::add('system.display', array('expires', 'prevent_output')); exit; } } return FALSE; } public static function check_headers() { foreach (headers_list() as $header) { if ((session_cache_limiter() == '' AND stripos($header, 'Last-Modified:') === 0) OR stripos($header, 'Expires:') === 0) { return FALSE; } } return TRUE; } public static function prevent_output() { Kohana::$output = ''; } }