I believe self-calls are handled; you can use @Cached on non-public methods as well.
On Thu, Mar 26, 2009 at 12:54 PM, Geoffrey Wiseman <geoffrey.wise...@gmail.com> wrote: > Does tapestry manipulate the page class enough that @Cached affects > self-calls? > > That is, if I wrote this code: > > @Cached > List<?> getSomeExpensiveResult() { ... } > > String getSummary() { > if( getSomeExpensiveResult().isEmpty() ) > return "nothing"; > else { > String summary = ""; > for( Object item : getSomeExpensiveResult() ) { > summary += item.toString(); > } > } > } > > Would getSummary() call getSomeExpensiveResult() twice (as it would if the > internals weren't manipulated in some way), or does Tapestry manipulate the > class enough that even that kind of use is cached? I've always got > @SetupRender as an alternative for calculating something expensive, from > what I can tell. > > - Geoffrey > -- > Geoffrey Wiseman > http://www.geoffreywiseman.ca/ > -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org