* 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.

Regards,
Jonathan Rockway

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

_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to