Index: includes/bootstrap.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v retrieving revision 1.167 diff -u -F^f -r1.167 bootstrap.inc --- includes/bootstrap.inc 25 May 2007 21:01:29 -0000 1.167 +++ includes/bootstrap.inc 28 May 2007 01:49:13 -0000 @@ -584,9 +584,11 @@ function drupal_page_cache_header($cache header("Last-Modified: $last_modified"); header("ETag: $etag"); - // The following headers force validation of cache: - header("Expires: Sun, 19 Nov 1978 05:00:00 GMT"); - header("Cache-Control: must-revalidate"); + // The following headers makes for better caching for anonymous users + // this applies to reverse proxies as well as browser caches too. + $cache_lifetime = variable_get('cache_lifetime', 0); + header("Expires: " . gmdate("D, d M Y H:i:s", time() + $cache_lifetime) . " GMT"); + header("Cache-Control: public, max-age=" . $cache_lifetime); // Determine if the browser accepts gzipped data. if (@strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') === FALSE && function_exists('gzencode')) {