]> ruin.nu Git - ndwebbie.git/commitdiff
By default dynamic content should not be cached
authorMichael Andreen <harv@ruin.nu>
Mon, 23 Jun 2008 19:35:51 +0000 (21:35 +0200)
committerMichael Andreen <harv@ruin.nu>
Tue, 24 Jun 2008 23:17:04 +0000 (01:17 +0200)
lib/NDWeb/Controller/Root.pm

index 6685c8537c812e0a41624c6808c24de5dd6625f0..9048fd0c965b8c578d04273280766661bfc083f3 100644 (file)
@@ -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) = @_;