From eee8184b29bd7c0989fe673e0bb3aee5f10b9423 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Wed, 27 Aug 2014 15:31:28 +0200 Subject: [PATCH] Update documentation This commit updates the documentation to mention that the #result object is available in the SpEL context for computing the key to use for a @CachePut operation. Issue: SPR-12125 --- src/asciidoc/index.adoc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/asciidoc/index.adoc b/src/asciidoc/index.adoc index 63dc28cef4..0d10fe6ac5 100644 --- a/src/asciidoc/index.adoc +++ b/src/asciidoc/index.adoc @@ -48003,8 +48003,9 @@ conditional computations: | result | evaluation context -| The result of the method call (the value to be cached). Only available in ' `unless`' - expressions and ' `cache evict`' expression (when `beforeInvocation` is `false`). +| The result of the method call (the value to be cached). Only available in `unless`' + expressions, `cache put` expression (to compute the `key`) or `cache evict` + expression (when `beforeInvocation` is `false`). | `#result` |=== @@ -48033,7 +48034,7 @@ strongly discouraged because they have different behaviors. While the latter cau method execution to be skipped by using the cache, the former forces the execution in order to execute a cache update. This leads to unexpected behavior and with the exception of specific corner-cases (such as annotations having conditions that exclude them from each -other), such declarations should be avoided. Note also that such conditions should not rely +other), such declaration should be avoided. Note also that such condition should not rely on the result object (i.e. the `#result` variable) as these are validated upfront to confirm the exclusion. ====