Currently PageCache caches write actions other than post like PUT and DELETE. It should probably only cache GET and HEAD requests.
Subject: | write_action.patch |
*** Catalyst-Plugin-PageCache_HEADERS/lib/Catalyst/Plugin/PageCache.pm 2010-01-02 19:45:08.000000000 -0500
--- Catalyst-Plugin-PageCache_WRITE/lib/Catalyst/Plugin/PageCache.pm 2010-01-02 20:39:49.000000000 -0500
***************
*** 152,159 ****
sub dispatch {
my $c = shift;
! # never serve POST request pages from cache
! return $c->next::method(@_) if ( $c->req->method eq "POST" );
my $hook =
$c->config->{'Plugin::PageCache'}->{cache_hook}
--- 152,159 ----
sub dispatch {
my $c = shift;
! # never serve POST, PUT, DELETE, ... request pages from cache. GET/HEAD only
! return $c->next::method(@_) unless ( $c->req->method eq 'GET' or $c->req->method eq 'HEAD' );
my $hook =
$c->config->{'Plugin::PageCache'}->{cache_hook}