« Return to Thread: Is there a good solution of file cache? which plugin is recommended?

Re: Is there a good solution of file cache? which plugin is recommended?

by J. Shirley :: Rate this Message:

Reply to Author | View in Thread

On Wed, Jun 24, 2009 at 5:27 PM, <kakimoto@...> 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).

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.

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

 « Return to Thread: Is there a good solution of file cache? which plugin is recommended?