val unless: String
Spring Expression Language (SpEL) expression used to veto the cache put operation.
Unlike #condition, this expression is evaluated after the method has been called and can therefore refer to the result.
Default is "", meaning that caching is never vetoed.
The SpEL expression evaluates against a dedicated context that provides the following meta-data:
#result for a reference to the result of the method invocation. For supported wrappers such as Optional, #result refers to the actual object, not the wrapper#root.method, #root.target, and #root.caches for references to the java.lang.reflect.Method, target object, and affected cache(s) respectively.#root.methodName) and target class (#root.targetClass) are also available. #root.args[1], #p1 or #a1. Arguments can also be accessed by name if that information is available.Since
3.2