[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cgiapp] RFC: CGI::Application::RunModeCache


Quoting Sam Tregar <suppressed>:

> On Wed, 12 May 2004, Brian Cassidy wrote:
> > Gedcom.pm. Some of its operations can be quite lengthy, thus caching would
> > be wise.
> 
> Why not just Memoize the methods that access Gedcom.pm?  It's not

Memoize is mainly used in persistant environments.  Although many people use
mod_perl or SpeedyCGI with C::A, we are talking about "CGI"::Application, so a
disk based cache makes sense as a default.  

> obvious to me that caching the entire page is right choice here.
> Often-times an application will include dynamic components and static
> cacheable components on the same page.

In that case it makes more sense to add caching support to Gedcom.pm itself, so
that it returns cached data or fresh data automatically.  If Gedcom.pm can not
be changed, a wrapper could be implemented.

I still think caching the whole page can be useful, and Brian has implemented a
caching system that doesn't require much work to implement in your
CGI::Application modules.

> > Cache::FileCache is used by default, but you can pass in your own Cache::*
> > to replace it.
> 
> The Cache::* modules are quite slow in my experience.  I've used
> Cache::Mmap for disk-based caching and I've heard Cache::FastMmap is
> even better.

I have heard good things about Cache::Mmap as well.

Cheers,

Cees

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.