Skip to content

Commit d6ecc3c

Browse files
author
Anders D. Johnson
committed
Fix condition vs. conditional typo in @Cacheable reference documenation
It seems this was a typo, since the parameter is named condition, not conditional. Issue: SPR-12273
1 parent 1e7bfd9 commit d6ecc3c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/asciidoc/index.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49229,7 +49229,7 @@ result in an exception as a custom `CacheManager` will be ignored by the
4922949229
===== Conditional caching
4923049230
Sometimes, a method might not be suitable for caching all the time (for example, it
4923149231
might depend on the given arguments). The cache annotations support such functionality
49232-
through the `conditional` parameter which takes a `SpEL` expression that is evaluated to
49232+
through the `condition` parameter which takes a `SpEL` expression that is evaluated to
4923349233
either `true` or `false`. If `true`, the method is cached - if not, it behaves as if the
4923449234
method is not cached, that is executed every since time no matter what values are in the
4923549235
cache or what arguments are used. A quick example - the following method will be cached
@@ -49242,8 +49242,8 @@ only if the argument `name` has a length shorter than 32:
4924249242
public Book findBook(String name)
4924349243
----
4924449244

49245-
In addition the `conditional` parameter, the `unless` parameter can be used to veto the
49246-
adding of a value to the cache. Unlike `conditional`, `unless` expressions are evaluated
49245+
In addition the `condition` parameter, the `unless` parameter can be used to veto the
49246+
adding of a value to the cache. Unlike `condition`, `unless` expressions are evaluated
4924749247
__after__ the method has been called. Expanding on the previous example - perhaps we
4924849248
only want to cache paperback books:
4924949249

0 commit comments

Comments
 (0)