[Catalyst] Is there a good solution of file cache? which plugin is recommended?

J. Shirley jshirley at gmail.com
Thu Jun 25 01:00:52 GMT 2009


On Wed, Jun 24, 2009 at 5:27 PM, <kakimoto at tpg.com.au> wrote:

> Hi, there,
>  I looked at the example in the doc for Catalyst::Plugin::PageCache
> (
> http://search.cpan.org/~agrundma/Catalyst-Plugin-PageCache-0.21/lib/Catal=
yst/Plugin/PageCache.pm<http://search.cpan.org/%7Eagrundma/Catalyst-Plugin-=
PageCache-0.21/lib/Catalyst/Plugin/PageCache.pm>
> ).
>
> I m not very clear on it.
>
> 1) Can someone please tell me where "sub some_method" is supposed to
> reside? Is it in the controller? Can't be cause there's a section
> commented "# in a controller method"
>
> 2) Has anyone used Catalyst::Plugin::PageCache? Any complaints or words
> of praise?
>
> Thank you:)
>
> K. akimoto
>
>
If you look at the configuration, you'll see that 'some_method' is defined
as the cache_hook.  This is to determine if the request (prior to dispatch)
should be cached or not.

>From the synopsis:

            # Optionally, a cache hook to be called prior to dispatch to
            # determine if the page should be cached.  This is called both
            # before dispatch, and before finalize.


I've used PageCache, and it works out well enough.  This was before I
learned about how to properly setup a reverse proxy that can cache (varnish
is my favorite) -- since spending some hours learning how to work with
Varnish, I haven't used PageCache and likely never will again.

However, if you just want a plugin to "work" then PageCache will work fine.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090624/f87db=
342/attachment.htm


More information about the Catalyst mailing list