Hi Jens,

As it happens I too was thinking about this a while back.
I didn't make any research, but I would probably look into making mixin or
component using the before and after render phases.

Saving/caching the markup in after - and then short-circuit in before if
cache is valid. I think is should be possible to get the markup from the
MarkupWriter.

Providing a cache key as parameter
(like the 'watch' in
http://tapestry.apache.org/5.3.4/apidocs/org/apache/tapestry5/annotations/Cached.html
)
should be pretty strait forward to implement as well

Some known challenges/limitations:
* imported javascript/css in inner components
* use of javascriptsupport in inner components


Perhaps I'll give it a crack at it after the vacations if youre still
looking for a solution.

cheers
Magnus

On Sat, Jul 28, 2012 at 1:11 PM, Jens Breitenstein <mailingl...@j-b-s.de>wrote:

> Hi T5'ers
>
> we have some performance issues and started thinking about caching our
> pages (lets say parts of them to be precise). Due to the fact we are
> showing user related information along with "public information" on a page,
> we can not make use of a simple web proxy caching.
>
> Therefore we are thinking about a "component rendering result cache".
>
> Assume we have several independent components to show an overview of items
> (and we have a lot of items rendered in a loop) and we want to cache the
> rendering result of one of these particular components for several seconds
> before rendering it again (to reflect new items or changes). I am aware
> this means we are showing stale data for some seconds, but honestly this is
> not an issue because after rendering and displaying it in the browser data
> is considerably old anyway :-)
>
> What might be a good place to intercept the rendering and store the output
> from a component and on the other hand use outputraw for sending cached
> data?
> Does anyone tried this before?
>
> Any idea or comment is appreciated, thanks in advance
>
>
> Jens
>
>
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: 
> users-unsubscribe@tapestry.**apache.org<users-unsubscr...@tapestry.apache.org>
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to