How would I render the component and stick the contents into a label?

If possible, I would like to do something like the following...

String render() {

    String markup = cache.get();
    if (cacheExpired || markup == null) {
       markup = render();
    }

    return markup;
}

I know there is no "String render()" method, but this just shows what I
would like to accomplish.

Thanks!


On Tue, 2007-10-23 at 20:00 -0700, Igor Vaynberg wrote:
> use any cache you want to cache it, and stick the contents into a label
> 
> -igor
> 
> 
> On 10/23/07, Joe Toth <[EMAIL PROTECTED]> wrote:
> > There are some operations that are kind of complicated, rather than dig
> > into those operations and try to cache things, it would be A LOT easier
> > to just stick a cache in front of it all.
> >
> >
> >
> > On Tue, 2007-10-23 at 21:01 -0500, Jeremy Thomerson wrote:
> > > The first thing to ask yourself would be if you really need to do that.
> > > HTML generation is extremely fast, and generally does not need to be
> > > cached.  If page generation is taking a long time, it is likely that DB
> > > operations or external service operations are what needs to be cached.
> > >
> > > Was there a particular reason you had in mind for caching the HTML?
> > >
> > > Jeremy Thomerson
> > >
> > > On 10/23/07, Joe Toth <[EMAIL PROTECTED]> wrote:
> > > >
> > > > I have a bunch of Panels where the generated HTML can be cached for a
> > > > period of time.
> > > >
> > > > What's the best way to go about doing something like this?
> > > >
> > > > Thanks!
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to