[Catalyst] Capture page on server?

Jonathan Rockway jon at jrock.us
Tue Jun 24 12:08:35 BST 2008

* On Mon, Jun 23 2008, Ryan D Johnson wrote:
> On this subject though, PageCache is a really useful low-work
> high-return way to do some simple page caching from Catalyst. It has
> built-in support for only caching unauth'd pages, caches based on
> wildcards, all kinds of useful stuff. 
> But there is one caveat I ran into when playing with it. If you're doing
> Content-Encoding negotiation in Catalyst (with C::P::Compress::Gzip, for
> example), the PageCache doesn't know about it and will cache either the
> gzip'd or plain version depending on which is first hit, then serve that
> out indiscriminately to all clients. 
> As an example, hit a cachable page with your web browser (which supports gzip),
> then try to fetch the same (cached) page with curl or something; you'll
> get the gzip'd stream of gibberish. 

Use Angerwhale::Plugin::Cache instead.  It solves this problem.

Jonathan Rockway

print just => another => perl => hacker => if $,=$"

More information about the Catalyst mailing list