diff --git a/spring-context/src/main/java/org/springframework/cache/annotation/CacheEvict.java b/spring-context/src/main/java/org/springframework/cache/annotation/CacheEvict.java index 2a6f263d2f..a2d0c2f3a1 100644 --- a/spring-context/src/main/java/org/springframework/cache/annotation/CacheEvict.java +++ b/spring-context/src/main/java/org/springframework/cache/annotation/CacheEvict.java @@ -26,8 +26,8 @@ import java.lang.annotation.Target; import org.springframework.core.annotation.AliasFor; /** - * Annotation indicating that a method (or all methods on a class) triggers - * a cache eviction operation. + * Annotation indicating that a method (or all methods on a class) triggers a + * {@link org.springframework.cache.Cache#evict(Object) cache evict} operation. * * @author Costin Leau * @author Stephane Nicoll @@ -60,8 +60,8 @@ public @interface CacheEvict { /** * Spring Expression Language (SpEL) expression for computing the key dynamically. - *
Default is {@code ""}, meaning all method parameters are considered as a key, unless - * a custom {@link #keyGenerator} has been set. + *
Default is {@code ""}, meaning all method parameters are considered as a key, + * unless a custom {@link #keyGenerator} has been set. *
The SpEL expression evaluates again a dedicated context that provides the * following meta-data: *
Mutually exclusive with the {@link #key} attribute. * @see CacheConfig#keyGenerator */ @@ -97,7 +98,8 @@ public @interface CacheEvict { String cacheManager() default ""; /** - * The bean name of the custom {@link org.springframework.cache.interceptor.CacheResolver} to use. + * The bean name of the custom {@link org.springframework.cache.interceptor.CacheResolver} + * to use. * @see CacheConfig#cacheResolver */ String cacheResolver() default ""; diff --git a/spring-context/src/main/java/org/springframework/cache/annotation/CachePut.java b/spring-context/src/main/java/org/springframework/cache/annotation/CachePut.java index e198a2731d..bcea549453 100644 --- a/spring-context/src/main/java/org/springframework/cache/annotation/CachePut.java +++ b/spring-context/src/main/java/org/springframework/cache/annotation/CachePut.java @@ -23,16 +23,15 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import org.springframework.cache.Cache; import org.springframework.core.annotation.AliasFor; /** - * Annotation indicating that a method (or all methods on a class) triggers - * a {@linkplain Cache#put(Object, Object) cache put} operation. + * Annotation indicating that a method (or all methods on a class) triggers a + * {@link org.springframework.cache.Cache#put(Object, Object) cache put} operation. * *
In contrast to the {@link Cacheable @Cacheable} annotation, this annotation * does not cause the advised method to be skipped. Rather, it always causes the - * method to be invoked and its result to be stored in a cache. + * method to be invoked and its result to be stored in the associated cache. * * @author Costin Leau * @author Phillip Webb @@ -41,7 +40,7 @@ import org.springframework.core.annotation.AliasFor; * @since 3.1 * @see CacheConfig */ -@Target({ ElementType.METHOD, ElementType.TYPE }) +@Target({ElementType.METHOD, ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) @Inherited @Documented @@ -66,8 +65,8 @@ public @interface CachePut { /** * Spring Expression Language (SpEL) expression for computing the key dynamically. - *
Default is {@code ""}, meaning all method parameters are considered as a key, unless - * a custom {@link #keyGenerator} has been set. + *
Default is {@code ""}, meaning all method parameters are considered as a key, + * unless a custom {@link #keyGenerator} has been set. *
The SpEL expression evaluates again a dedicated context that provides the * following meta-data: *
Mutually exclusive with the {@link #key} attribute. * @see CacheConfig#keyGenerator */ @@ -102,7 +102,8 @@ public @interface CachePut { String cacheManager() default ""; /** - * The bean name of the custom {@link org.springframework.cache.interceptor.CacheResolver} to use. + * The bean name of the custom {@link org.springframework.cache.interceptor.CacheResolver} + * to use. * @see CacheConfig#cacheResolver */ String cacheResolver() default ""; diff --git a/spring-context/src/main/java/org/springframework/cache/annotation/Cacheable.java b/spring-context/src/main/java/org/springframework/cache/annotation/Cacheable.java index d67f84572a..a5d336a6d6 100644 --- a/spring-context/src/main/java/org/springframework/cache/annotation/Cacheable.java +++ b/spring-context/src/main/java/org/springframework/cache/annotation/Cacheable.java @@ -30,14 +30,14 @@ import org.springframework.core.annotation.AliasFor; * in a class) can be cached. * *
Each time an advised method is invoked, caching behavior will be applied, - * checking whether the method has been already invoked for the given arguments. A - * sensible default simply uses the method parameters to compute the key, but a SpEL - * expression can be provided via the {@link #key} attribute, or a custom - * {@link org.springframework.cache.interceptor.KeyGenerator KeyGenerator} implementation - * can replace the default one (see {@link #keyGenerator}). + * checking whether the method has been already invoked for the given arguments. + * A sensible default simply uses the method parameters to compute the key, but + * a SpEL expression can be provided via the {@link #key} attribute, or a custom + * {@link org.springframework.cache.interceptor.KeyGenerator} implementation can + * replace the default one (see {@link #keyGenerator}). * - *
If no value is found in the cache for the computed key, the method is invoked - * and the returned value is used as the cache value. + *
If no value is found in the cache for the computed key, the target method + * will be invoked and the returned value stored in the associated cache. * * @author Costin Leau * @author Phillip Webb @@ -89,7 +89,8 @@ public @interface Cacheable { String key() default ""; /** - * The bean name of the custom {@link org.springframework.cache.interceptor.KeyGenerator} to use. + * The bean name of the custom {@link org.springframework.cache.interceptor.KeyGenerator} + * to use. *
Mutually exclusive with the {@link #key} attribute. * @see CacheConfig#keyGenerator */ @@ -106,7 +107,8 @@ public @interface Cacheable { String cacheManager() default ""; /** - * The bean name of the custom {@link org.springframework.cache.interceptor.CacheResolver} to use. + * The bean name of the custom {@link org.springframework.cache.interceptor.CacheResolver} + * to use. * @see CacheConfig#cacheResolver */ String cacheResolver() default "";