File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -46288,7 +46288,7 @@ properties or even an arbitrary (static) method.
46288
46288
===== Conditional caching
46289
46289
Sometimes, a method might not be suitable for caching all the time (for example, it
46290
46290
might depend on the given arguments). The cache annotations support such functionality
46291
- through the `conditional ` parameter which takes a `SpEL` expression that is evaluated to
46291
+ through the `condition ` parameter which takes a `SpEL` expression that is evaluated to
46292
46292
either `true` or `false`. If `true`, the method is cached - if not, it behaves as if the
46293
46293
method is not cached, that is executed every since time no matter what values are in the
46294
46294
cache or what arguments are used. A quick example - the following method will be cached
@@ -46301,8 +46301,8 @@ only if the argument `name` has a length shorter than 32:
46301
46301
public Book findBook(String name)
46302
46302
----
46303
46303
46304
- In addition the `conditional ` parameter, the `unless` parameter can be used to veto the
46305
- adding of a value to the cache. Unlike `conditional `, `unless` expressions are evaluated
46304
+ In addition the `condition ` parameter, the `unless` parameter can be used to veto the
46305
+ adding of a value to the cache. Unlike `condition `, `unless` expressions are evaluated
46306
46306
__after__ the method has been called. Expanding on the previous example - perhaps we
46307
46307
only want to cache paperback books:
46308
46308
You can’t perform that action at this time.
0 commit comments