logo       

Re: Caching Output of Components: msg#00024

Subject: Re: Caching Output of Components
Another option is replace your direct DB calls with something that creates a 
ready-to-go presentation and keeps it cached in Cache::MemCached  or such.

We do this for "events" pages on our pages and have found it to cut processing 
time by several orders of magnitude.

If you have LOAD_PERL on your can use it directly from your template... or you 
can have a mod_perl handler do the lifting for you.

On Sun, Aug 06, 2006 at 09:29:02PM -0400, Robert James Kaes wrote:
> On Sun, 06 Aug 2006, Randal L. Schwartz wrote:
> > >>>>> "Robert" == Robert James Kaes 
> > >>>>> <rjk-auz4xgPZSajD1m2VYDcomQ@xxxxxxxxxxxxxxxx> writes:
> > 
> > Robert> I'd like to say "the output of all components are cached.  If a 
> > child
> > Robert> component has changed, invalidate the child cache and its parent's
> > Robert> cache."  It would also be nice to selectively say "this component's
> > Robert> output must never be cached."
> > 
> > I've looked at this a number of times, and never gotten very far.  If I may
> > misquote Perrin, he's said something to the effect that the expense for
> > determining when to blow a cache (and how much to blow) often exceeds the 
> > cost
> > of just recomputing the darn thing.  And yes, it's a can of worms.
> 
> Thank you, you raise a good point that I had not fully considered.  My
> goal is to display a dynamically generated page, but where most of the
> "dynamic" content is actually static for a period amount of time.  (Take
> a news page, for example, where the list of news stories updates once an
> hour.)
> 
> Having thought about the problem a bit more, I can likely simulate what
> I'm looking for by using a template that INSERTs the "dynamic" content
> that was generated by a cronjob periodically.  This would move the heavy
> DB processing offline relative to the page view.
> 
> Randal, thank you for your insight!
> 
> Have a great night.
>     -- Robert
> 
> -- 
> Robert James Kaes
> WormBytes Consulting and Contracting
> http://www.wormbytes.ca/
> 
> _______________________________________________
> templates mailing list
> templates-MnLy+PD7ppGDO3lXZvfOKmD2FQJk+8+b@xxxxxxxxxxxxxxxx
> http://lists.template-toolkit.org/mailman/listinfo/templates

-- 
Todd Freeman  Ext 6103                   .^.    Don't fear the penguins!
Programming Department                   /V\
Andrews University                      // \\    http://www.linux.org/
http://www.andrews.edu/~freeman/       /(   )\   http://www.debian.org/
                                        ^^ ^^

Attachment: signature.asc
Description: Digital signature

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe