Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r64903 - website/public_html/beta/common/code
From: dnljms_at_[hidden]
Date: 2010-08-18 18:49:41


Author: danieljames
Date: 2010-08-18 18:49:40 EDT (Wed, 18 Aug 2010)
New Revision: 64903
URL: http://svn.boost.org/trac/boost/changeset/64903

Log:
Add more 'expires' and 'cache-control' headers to try to encourage caching.
Text files modified:
   website/public_html/beta/common/code/boost_archive.php | 9 +++++++++
   1 files changed, 9 insertions(+), 0 deletions(-)

Modified: website/public_html/beta/common/code/boost_archive.php
==============================================================================
--- website/public_html/beta/common/code/boost_archive.php (original)
+++ website/public_html/beta/common/code/boost_archive.php 2010-08-18 18:49:40 EDT (Wed, 18 Aug 2010)
@@ -229,6 +229,9 @@
         case 'application/xml-dtd':
             header('Expires: '.date(DATE_RFC2822, strtotime("+1 year")));
             header('Cache-Control: max-age=31556926'); // A year, give or take a day.
+ default:
+ header('Expires: '.date(DATE_RFC2822, strtotime("+1 month")));
+ header('Cache-Control: max-age=2592000'); // 30 days
     }
 
     // Since we're not returning a HTTP error for non-existant files,
@@ -276,6 +279,9 @@
 
 
 function extract_file($unzip, &$content) {
+ header('Expires: '.date(DATE_RFC2822, strtotime("+1 month")));
+ header('Cache-Control: max-age=2592000'); // 30 days
+
     $file_handle = popen($unzip,'r');
     $text = '';
     while ($file_handle && !feof($file_handle)) {
@@ -294,6 +300,9 @@
 }
 
 function extract_unzipped_file($file, &$content) {
+ header('Expires: '.date(DATE_RFC2822, strtotime("+1 month")));
+ header('Cache-Control: max-age=2592000'); // 30 days
+
     $file_handle = fopen($file,'r');
 
     if($file_handle === FALSE) {


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk