Couldn't you set up your own markup writer and have it write into a
stringwriter instead of the markup writer that comes in via the request?
That way you could still use the markupwriter helper functions.

                StringWriter sw = new StringWriter();
                PrintWriter w = new PrintWriter(sw);
                HTMLWriter elvis = new HTMLWriter(w);

        Then when you're done:

        String cachedOutput = sw.toString();

        Then push the cachedOuput through the request's own writer and
you're golden.

        --- Pat


-----Original Message-----
From: Michael Musson [mailto:[EMAIL PROTECTED] 
Sent: Sunday, April 24, 2005 2:30 PM
To: Tapestry users
Subject: Re: Cache control results?

Yes, although the actual content of the control is quite lengthy and
generated recursively, and using the IMarkupWriter is a nice
convenience. If I go that route it would be nice to cache the writer
or at least its internal buffer.

But I wanted to make sure there is not a better way to do this since
it seems like a somewhat common performance optimization and Tapestry
contains direct support for other types of optimizations.

On 4/24/05, Patrick Casey <[EMAIL PROTECTED]> wrote:
> 
>         Couldn't you just override the control's render method?

---------------------------------------------------------------------
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