Matt Sergeant wrote:
> 
> On Thu, 2 Nov 2000, Neil Conway wrote:
> 
> > I'm writing a web app in mod_perl, using a PostgreSQL database
> > backend and HTML::Template. In looking for ways to optimize
> > performance, I noticed that although my code is doing several
> > (say, 4-5) database queries per handler/webpage, a large part
> > of the data (~2 queries) is mostly static (it will change
> > perhaps once per week, or once per month). It's obviously
> > inefficient to run these queries on the database for every
> > single request.
> >
> > How can I 'cache' this data so that all Apache children can
> > access it quickly? Is there a way to automatically update
> > this cache periodically (say every 10 minutes)? Also, this
> > solution should work on any reasonably modern UNIX system
> > (Win32 is not important for now).
> 
> Along with all the other fine suggestions here, you might like to check
> out the Memoize module on CPAN. I don't think it yet offers a way to
> invalidate the cache, but I know that is planned.

What about IPC::SharedCache ?

This should allow you to cache stuff in IPC and updateit from outside
apache via a crond job ?

just my 2 euro's worth.

Greg


> 
> --
> <Matt/>
> 
>     /||    ** Director and CTO **
>    //||    **  AxKit.com Ltd   **  ** XML Application Serving **
>   // ||    ** http://axkit.org **  ** XSLT, XPathScript, XSP  **
>  // \\| // **     Personal Web Site: http://sergeant.org/     **
>      \\//
>      //\\
>     //  \\


Reply via email to