
jshirley at gmail
Jun 24, 2009, 6:00 PM
Post #2 of 2
(310 views)
Permalink
|
|
Re: Is there a good solution of file cache? which plugin is recommended?
[In reply to]
|
|
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/Catalyst/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.
|