Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Users

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

 

 

Catalyst users RSS feed   Index | Next | Previous | View Threaded


kakimoto at tpg

Jun 24, 2009, 5:27 PM

Post #1 of 2 (352 views)
Permalink
Is there a good solution of file cache? which plugin is recommended?

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


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

Matt S Trout
Thu, 30 Apr 2009 15:45:40 -0700

On Thu, Apr 30, 2009 at 11:46:12PM +0800, Malloy wrote:

Vague question is vague.

Perhaps you could try asking a question with some detail about what you're
going to be caching, why you want to do so, and why you think a Catalyst
plugin is the right layer of your stack to do this?



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


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.

Catalyst users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.