From 66c1b257bd6d8dcc33cbad81128eb23e41477d96 Mon Sep 17 00:00:00 2001 From: Michael Andreen Date: Mon, 23 Jun 2008 21:35:51 +0200 Subject: [PATCH] By default dynamic content should not be cached --- lib/NDWeb/Controller/Root.pm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/NDWeb/Controller/Root.pm b/lib/NDWeb/Controller/Root.pm index 6685c85..9048fd0 100644 --- a/lib/NDWeb/Controller/Root.pm +++ b/lib/NDWeb/Controller/Root.pm @@ -56,8 +56,16 @@ sub logout : Local { $c->res->redirect($c->uri_for('index')); } -#sub begin : private { -#} +sub begin : Private { + my ($self, $c) = @_; + + $c->res->header( 'Cache-Control' => + 'no-store, no-cache, must-revalidate,'. + 'post-check=0, pre-check=0, max-age=0' + ); + $c->res->header( 'Pragma' => 'no-cache' ); + $c->res->header( 'Expires' => 'Thu, 01 Jan 1970 00:00:00 GMT' ); +} sub listTargets : Private { my ($self, $c) = @_; -- 2.39.2