LP#1681095 Set aggressive default cache expires timelines
authorDan Scott <dan@coffeecode.net>
Sat, 8 Apr 2017 15:02:02 +0000 (11:02 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Mon, 7 Aug 2017 18:07:00 +0000 (14:07 -0400)
Now that we have a broad cache-busting mechanism, set the default cache expires
timelines for non-HTML types far in the future.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Josh Stompro <stomproj@larl.org>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>

Open-ILS/examples/apache/eg.conf.in
Open-ILS/examples/apache_24/eg.conf.in

index 19d8736..f8c9729 100644 (file)
@@ -88,17 +88,19 @@ Alias /updates/ "@localstatedir@/updates/pub/"
        Options ExecCGI
 </Directory>
 
-
 # ----------------------------------------------------------------------------------
-# OPTIONAL: Set how long the client will cache our content.  Change to suit
+# OPTIONAL: Set how long the client will cache our content.
+# We set a long expires time for CSS, JavaScript, and images (default) because
+# you can change the cache-key in opac/parts/config.tt2 to force browsers to
+# reload them immediately.
 # ----------------------------------------------------------------------------------
 ExpiresActive On
-ExpiresDefault "access plus 1 month"
+ExpiresDefault "access plus 1 year"
 ExpiresByType text/html "access plus 18 hours"
 ExpiresByType application/xhtml+xml "access plus 18 hours"
-ExpiresByType application/x-javascript "access plus 18 hours"
-ExpiresByType application/javascript "access plus 18 hours"
-ExpiresByType text/css "access plus 50 minutes"
+ExpiresByType application/x-javascript "access plus 1 year"
+ExpiresByType application/javascript "access plus 1 year"
+ExpiresByType text/css "access plus 1 year"
 
 # ----------------------------------------------------------------------------------
 # Set up our SSL virtual host
index 72bcd5e..2ee0153 100644 (file)
@@ -85,17 +85,19 @@ Alias /updates/ "@localstatedir@/updates/pub/"
     Require all granted
 </Directory>
 
-
 # ----------------------------------------------------------------------------------
-# OPTIONAL: Set how long the client will cache our content.  Change to suit
+# OPTIONAL: Set how long the client will cache our content.
+# We set a long expires time for CSS, JavaScript, and images (default) because
+# you can change the cache-key in opac/parts/config.tt2 to force browsers to
+# reload them immediately.
 # ----------------------------------------------------------------------------------
 ExpiresActive On
-ExpiresDefault "access plus 1 month"
+ExpiresDefault "access plus 1 year"
 ExpiresByType text/html "access plus 18 hours"
 ExpiresByType application/xhtml+xml "access plus 18 hours"
-ExpiresByType application/x-javascript "access plus 18 hours"
-ExpiresByType application/javascript "access plus 18 hours"
-ExpiresByType text/css "access plus 50 minutes"
+ExpiresByType application/x-javascript "access plus 1 year"
+ExpiresByType application/javascript "access plus 1 year"
+ExpiresByType text/css "access plus 1 year"
 
 # ----------------------------------------------------------------------------------
 # Set up our SSL virtual host