Author: bobharner
Date: Mon Feb 16 16:45:57 2015
New Revision: 940370
Log:
Manually updated the 5.3.7 version of the Cached.html javadoc page for
TAP5-2288. Only a temporary fix until the 5.3.8 javadocs are published.
Modified:
websites/production/tapestry/content/5.3.7/apidocs/org/apache/tapestry5/annotations/Cached.html
Modified:
websites/production/tapestry/content/5.3.7/apidocs/org/apache/tapestry5/annotations/Cached.html
==============================================================================
---
websites/production/tapestry/content/5.3.7/apidocs/org/apache/tapestry5/annotations/Cached.html
(original)
+++
websites/production/tapestry/content/5.3.7/apidocs/org/apache/tapestry5/annotations/Cached.html
Mon Feb 16 16:45:57 2015
@@ -101,17 +101,30 @@ Annotation Type Cached</H2>
</PRE>
<P>
-Indicates that a method should only be evaluated once and the result cached.
All further calls to the method will
- return the cached result. Note that this annotation is inheritence-safe; if a
subclass calls a superclass method that
- has \@Cached then the value the subclass method gets is the cached value.
+Indicates that a method should only be evaluated once per request and the
result cached.
+ Further calls to the method during the same request will return the cached
result.
+ However, if the method's component occurs more than once within an enclosing
component,
+ the cached results will be distinct for each occurrence.
+ <p/>
+ This annotation is commonly used on getters for component properties:
+ <pre>
+ @Cached
+ Date getNow() {
+ new Date();
+ }
+ </pre>
+ You may not apply @Cached to void methods or methods with parameters.
+ <p/>
+ Note that this annotation is inheritance-safe; if a subclass calls a
superclass method that
+ has @Cached then the value the subclass method gets is the cached value.
<p/>
The watch parameter can be passed a binding expression which will be
evaluated each time the method is called. The
method will then only be executed the first time it is called and after that
only when the value of the binding
changes. This can be used, for instance, to have the method only evaluated
once per iteration of a loop by setting
- watch to the value or index of the loop.
-<P>
+ watch to the value or index of the loop.</div>
+</li>
+</ul>
-<P>
<HR>
<P>