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/

Reply via email to