You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by michael lim <ji...@yahoo.com> on 2008/08/26 08:43:47 UTC
cache on T4 page
in my pagevalidate method, i call db to retrieve information and print out on
page using @insert
how do i cache it so that it will not hit the db so frequent ? any example?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: cache on T4 page
Posted by Kalle Korhonen <ka...@gmail.com>.
Can't do this in pageValidate but if you use Tacos, you can decorate a
getter method with @Cached which will cache the result for the lifetime of a
single request (
http://tacos.sourceforge.net/tacos4.1/tacos-annotations/index.html).
Kalle
On Thu, Aug 28, 2008 at 12:25 PM, Henrik Schlanbusch <he...@enovate.no>wrote:
>
>
> michael lim <jim_theory <at> yahoo.com> writes:
>
> >
> > in my pagevalidate method, i call db to retrieve information and print
> out on
> > page using @insert
> >
> > how do i cache it so that it will not hit the db so frequent ? any
> example?
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe <at> tapestry.apache.org
> > For additional commands, e-mail: users-help <at> tapestry.apache.org
> >
> >
>
> Hi
>
> We have the same problem - which slows down our app to
> a level that is not acceptable. There probably is some pattern
> that I have not picked up. Our hibernate beans are loaded
> each time the ognl expressions read our objects. I guesss
> there is some way to evict the hibernate loaded objects in the
> prepare for render method, before the rendering happens in order
> to avoid hitting the db for every property the ognl tries to read
> from the object, or is there some better way?
>
> Henrik
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
Re: cache on T4 page
Posted by Henrik Schlanbusch <he...@enovate.no>.
michael lim <jim_theory <at> yahoo.com> writes:
>
> in my pagevalidate method, i call db to retrieve information and print out on
> page using @insert
>
> how do i cache it so that it will not hit the db so frequent ? any example?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe <at> tapestry.apache.org
> For additional commands, e-mail: users-help <at> tapestry.apache.org
>
>
Hi
We have the same problem - which slows down our app to
a level that is not acceptable. There probably is some pattern
that I have not picked up. Our hibernate beans are loaded
each time the ognl expressions read our objects. I guesss
there is some way to evict the hibernate loaded objects in the
prepare for render method, before the rendering happens in order
to avoid hitting the db for every property the ognl tries to read
from the object, or is there some better way?
Henrik
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org