spring-framework / org.springframework.cache.annotation / CachePut / unless

unless

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:

Since
3.2