[snapshot/master] Set expire/caching headers earlier in the archive controller so that we send back the default caching time for directories (10minutes currently) for all 404 errors
---
web/app/snapshot/controllers/archive.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/web/app/snapshot/controllers/archive.py b/web/app/snapshot/controllers/archive.py
index 7c95e1b..8eb9b0a 100644
--- a/web/app/snapshot/controllers/archive.py
+++ b/web/app/snapshot/controllers/archive.py
@@ -195,7 +195,6 @@ class ArchiveController(BaseController):
c.nav[key+'_link'] = os.path.join('/archive', archive, rfc3339_timestamp(c.nav[key]), stat['path'].strip('/'), '')
c.breadcrumbs = self._build_crumbs(archive, run, stat['path'])
- set_expires(int(config['app_conf']['expires.archive.dir']))
c.title = '%s:%s (%s)'%(archive, stat['path'], run['run'])
return render('/archive-dir.mako')
@@ -221,6 +220,7 @@ class ArchiveController(BaseController):
def dir(self, archive, date, url):
try:
#etag_cache( g.shm.mirrorruns_get_etag(self._db(), archive) )
+ set_expires(int(config['app_conf']['expires.archive.dir']))
if not self._dateok(date):
abort(404, 'Invalid date string - nothing to be found here.')
--
1.5.6.5
Reply to: