[Catalyst] PageCache and white labelling?

Matt S Trout dbix-class at trout.me.uk
Fri Aug 8 15:19:36 BST 2008


On Fri, Aug 08, 2008 at 05:08:02PM +0800, Martin Ellison wrote:
> But PageCache only works off $c->request->path() ie not the hostname. This
> behaviour is coded in the _get_page_cache_key() subroutine. This means that
> the PageCache serves up the same page content for all websites, irrespective
> of URL, which is not what I want.
> 
> It would be nice if there were some way to fix this and keep using
> PageCache, such as overriding _get_page_cache_key(). Does that make sense?
> eg writing a derived class from PageCache?

How about

__PACKAGE__->config(
  'Plugin::PageCache' => {
    key_maker => sub {
      my $c = shift;
      handwave($c);
    }
  }
);

and making the current implementation the default in the absence thereof?

Fancy having a play with doing a patch?

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director                    http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://chainsawblues.vox.com/            http://www.shadowcat.co.uk/servers/



More information about the Catalyst mailing list