Skip to content

Commit 76f84b9

Browse files
committed
Polishing
1 parent 11806b9 commit 76f84b9

File tree

3 files changed

+29
-24
lines changed

3 files changed

+29
-24
lines changed

spring-context/src/main/java/org/springframework/cache/annotation/CacheEvict.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
import org.springframework.core.annotation.AliasFor;
2727

2828
/**
29-
* Annotation indicating that a method (or all methods on a class) triggers
30-
* a cache eviction operation.
29+
* Annotation indicating that a method (or all methods on a class) triggers a
30+
* {@link org.springframework.cache.Cache#evict(Object) cache evict} operation.
3131
*
3232
* @author Costin Leau
3333
* @author Stephane Nicoll
@@ -60,8 +60,8 @@
6060

6161
/**
6262
* Spring Expression Language (SpEL) expression for computing the key dynamically.
63-
* <p>Default is {@code ""}, meaning all method parameters are considered as a key, unless
64-
* a custom {@link #keyGenerator} has been set.
63+
* <p>Default is {@code ""}, meaning all method parameters are considered as a key,
64+
* unless a custom {@link #keyGenerator} has been set.
6565
* <p>The SpEL expression evaluates again a dedicated context that provides the
6666
* following meta-data:
6767
* <ul>
@@ -80,7 +80,8 @@
8080
String key() default "";
8181

8282
/**
83-
* The bean name of the custom {@link org.springframework.cache.interceptor.KeyGenerator} to use.
83+
* The bean name of the custom {@link org.springframework.cache.interceptor.KeyGenerator}
84+
* to use.
8485
* <p>Mutually exclusive with the {@link #key} attribute.
8586
* @see CacheConfig#keyGenerator
8687
*/
@@ -97,7 +98,8 @@
9798
String cacheManager() default "";
9899

99100
/**
100-
* The bean name of the custom {@link org.springframework.cache.interceptor.CacheResolver} to use.
101+
* The bean name of the custom {@link org.springframework.cache.interceptor.CacheResolver}
102+
* to use.
101103
* @see CacheConfig#cacheResolver
102104
*/
103105
String cacheResolver() default "";

spring-context/src/main/java/org/springframework/cache/annotation/CachePut.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,15 @@
2323
import java.lang.annotation.RetentionPolicy;
2424
import java.lang.annotation.Target;
2525

26-
import org.springframework.cache.Cache;
2726
import org.springframework.core.annotation.AliasFor;
2827

2928
/**
30-
* Annotation indicating that a method (or all methods on a class) triggers
31-
* a {@linkplain Cache#put(Object, Object) cache put} operation.
29+
* Annotation indicating that a method (or all methods on a class) triggers a
30+
* {@link org.springframework.cache.Cache#put(Object, Object) cache put} operation.
3231
*
3332
* <p>In contrast to the {@link Cacheable @Cacheable} annotation, this annotation
3433
* does not cause the advised method to be skipped. Rather, it always causes the
35-
* method to be invoked and its result to be stored in a cache.
34+
* method to be invoked and its result to be stored in the associated cache.
3635
*
3736
* @author Costin Leau
3837
* @author Phillip Webb
@@ -41,7 +40,7 @@
4140
* @since 3.1
4241
* @see CacheConfig
4342
*/
44-
@Target({ ElementType.METHOD, ElementType.TYPE })
43+
@Target({ElementType.METHOD, ElementType.TYPE})
4544
@Retention(RetentionPolicy.RUNTIME)
4645
@Inherited
4746
@Documented
@@ -66,8 +65,8 @@
6665

6766
/**
6867
* Spring Expression Language (SpEL) expression for computing the key dynamically.
69-
* <p>Default is {@code ""}, meaning all method parameters are considered as a key, unless
70-
* a custom {@link #keyGenerator} has been set.
68+
* <p>Default is {@code ""}, meaning all method parameters are considered as a key,
69+
* unless a custom {@link #keyGenerator} has been set.
7170
* <p>The SpEL expression evaluates again a dedicated context that provides the
7271
* following meta-data:
7372
* <ul>
@@ -85,7 +84,8 @@
8584
String key() default "";
8685

8786
/**
88-
* The bean name of the custom {@link org.springframework.cache.interceptor.KeyGenerator} to use.
87+
* The bean name of the custom {@link org.springframework.cache.interceptor.KeyGenerator}
88+
* to use.
8989
* <p>Mutually exclusive with the {@link #key} attribute.
9090
* @see CacheConfig#keyGenerator
9191
*/
@@ -102,7 +102,8 @@
102102
String cacheManager() default "";
103103

104104
/**
105-
* The bean name of the custom {@link org.springframework.cache.interceptor.CacheResolver} to use.
105+
* The bean name of the custom {@link org.springframework.cache.interceptor.CacheResolver}
106+
* to use.
106107
* @see CacheConfig#cacheResolver
107108
*/
108109
String cacheResolver() default "";

spring-context/src/main/java/org/springframework/cache/annotation/Cacheable.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@
3030
* in a class) can be cached.
3131
*
3232
* <p>Each time an advised method is invoked, caching behavior will be applied,
33-
* checking whether the method has been already invoked for the given arguments. A
34-
* sensible default simply uses the method parameters to compute the key, but a SpEL
35-
* expression can be provided via the {@link #key} attribute, or a custom
36-
* {@link org.springframework.cache.interceptor.KeyGenerator KeyGenerator} implementation
37-
* can replace the default one (see {@link #keyGenerator}).
33+
* checking whether the method has been already invoked for the given arguments.
34+
* A sensible default simply uses the method parameters to compute the key, but
35+
* a SpEL expression can be provided via the {@link #key} attribute, or a custom
36+
* {@link org.springframework.cache.interceptor.KeyGenerator} implementation can
37+
* replace the default one (see {@link #keyGenerator}).
3838
*
39-
* <p>If no value is found in the cache for the computed key, the method is invoked
40-
* and the returned value is used as the cache value.
39+
* <p>If no value is found in the cache for the computed key, the target method
40+
* will be invoked and the returned value stored in the associated cache.
4141
*
4242
* @author Costin Leau
4343
* @author Phillip Webb
@@ -89,7 +89,8 @@
8989
String key() default "";
9090

9191
/**
92-
* The bean name of the custom {@link org.springframework.cache.interceptor.KeyGenerator} to use.
92+
* The bean name of the custom {@link org.springframework.cache.interceptor.KeyGenerator}
93+
* to use.
9394
* <p>Mutually exclusive with the {@link #key} attribute.
9495
* @see CacheConfig#keyGenerator
9596
*/
@@ -106,7 +107,8 @@
106107
String cacheManager() default "";
107108

108109
/**
109-
* The bean name of the custom {@link org.springframework.cache.interceptor.CacheResolver} to use.
110+
* The bean name of the custom {@link org.springframework.cache.interceptor.CacheResolver}
111+
* to use.
110112
* @see CacheConfig#cacheResolver
111113
*/
112114
String cacheResolver() default "";

0 commit comments

Comments
 (0)