aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-02-10 14:09:13 +0000
committerMatthew Somerville <matthew@mysociety.org>2012-02-10 14:09:13 +0000
commita8f22ee4f36ca28ca843c048ec4244eb894f3abf (patch)
tree9be224e62c9f75fda0a7faa79565323290cef1fd
parent9f3081242f82d15b092d10f8542ca0da849bc0e9 (diff)
Move cache header to under where errors could be shown.
-rw-r--r--perllib/FixMyStreet/App/Controller/Reports.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm
index 0587a627a..68dbd6359 100644
--- a/perllib/FixMyStreet/App/Controller/Reports.pm
+++ b/perllib/FixMyStreet/App/Controller/Reports.pm
@@ -31,8 +31,6 @@ Show the summary page of all reports.
sub index : Path : Args(0) {
my ( $self, $c ) = @_;
- $c->response->header('Cache-Control' => 'max-age=3600');
-
# Fetch all areas of the types we're interested in
my $areas_info;
eval {
@@ -73,6 +71,9 @@ sub index : Path : Args(0) {
sprintf(_('The error was: %s'), $@);
$c->stash->{template} = 'errors/generic.html';
}
+
+ # Down here so that error pages aren't cached.
+ $c->response->header('Cache-Control' => 'max-age=3600');
}
=head2 index