Keep things cached for at least 10min
[mirror/dsa-puppet.git] / modules / roles / templates / apache-security-tracker.debian.org.conf.erb
index e088158..6c7604e 100644 (file)
@@ -12,6 +12,16 @@ Use common-debian-service-https-redirect * security-tracker.debian.org
                UserDir disabled
        </IfModule>
 
+       <IfModule mod_cache_disk.c>
+               CacheEnable disk /
+               CacheMinExpire 600
+               # Keep serving stale entities for up to 10 seconds while
+               # they're being refreshed
+               CacheLock on
+               CacheLockPath /var/lock/apache2/mod_cache
+               CacheLockMaxAge 10
+       </IfModule>
+
        LogLevel warn
        ErrorLog /var/log/apache2/security-tracker.debian.org-error.log
        CustomLog /var/log/apache2/security-tracker.debian.org-access.log privacyssl
@@ -38,12 +48,16 @@ Use common-debian-service-https-redirect * security-tracker.debian.org
                Require all denied
        </DirectoryMatch>
 
-       <Location /tracker/data/json>
-               SetOutputFilter DEFLATE
-       </Location>
+       # can't handle this CPU wise
+       #<Location /tracker/data/json>
+       #       SetOutputFilter DEFLATE
+       #</Location>
 
        ProxyRequests off
        ProxyPass /tracker http://localhost:25648/tracker retry=1
        ProxyPassReverse /tracker http://localhost:25648/tracker
+
+       ExpiresActive On
+       ExpiresDefault "access plus 1 hour"
 </VirtualHost>
 # vim: set filetype=apache: