Skip to content

Commit ea09e57

Browse files
committed
Document support for @Cache* as merged composed annotations
Issue: SPR-13475
1 parent 2ed3382 commit ea09e57

File tree

5 files changed

+18
-6
lines changed

5 files changed

+18
-6
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2016 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -29,6 +29,9 @@
2929
* Annotation indicating that a method (or all methods on a class) triggers a
3030
* {@link org.springframework.cache.Cache#evict(Object) cache evict} operation.
3131
*
32+
* <p>This annotation may be used as a <em>meta-annotation</em> to create custom
33+
* <em>composed annotations</em> with attribute overrides.
34+
*
3235
* @author Costin Leau
3336
* @author Stephane Nicoll
3437
* @author Sam Brannen

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2016 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -33,6 +33,9 @@
3333
* does not cause the advised method to be skipped. Rather, it always causes the
3434
* method to be invoked and its result to be stored in the associated cache.
3535
*
36+
* <p>This annotation may be used as a <em>meta-annotation</em> to create custom
37+
* <em>composed annotations</em> with attribute overrides.
38+
*
3639
* @author Costin Leau
3740
* @author Phillip Webb
3841
* @author Stephane Nicoll

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2016 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -40,6 +40,9 @@
4040
* <p>If no value is found in the cache for the computed key, the target method
4141
* will be invoked and the returned value stored in the associated cache.
4242
*
43+
* <p>This annotation may be used as a <em>meta-annotation</em> to create custom
44+
* <em>composed annotations</em> with attribute overrides.
45+
*
4346
* @author Costin Leau
4447
* @author Phillip Webb
4548
* @author Stephane Nicoll

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2013 the original author or authors.
2+
* Copyright 2002-2016 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -26,6 +26,9 @@
2626
/**
2727
* Group annotation for multiple cache annotations (of different or the same type).
2828
*
29+
* <p>This annotation may be used as a <em>meta-annotation</em> to create custom
30+
* <em>composed annotations</em> with attribute overrides.
31+
*
2932
* @author Costin Leau
3033
* @author Chris Beams
3134
* @since 3.1

src/asciidoc/whats-new.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,6 @@ public @interface MyTestConfig {
641641
* `@Scheduled` and `@Schedules` may now be used as _meta-annotations_ to create
642642
custom _composed annotations_ with attribute overrides.
643643

644-
645644
=== Data Access Improvements
646645

647646
* `jdbc:initialize-database` and `jdbc:embedded-database` support a configurable
@@ -661,6 +660,8 @@ Spring 4.3 also improves the caching abstraction as follows:
661660
`@beanName.method()`).
662661
* `ConcurrentMapCacheManager` and `ConcurrentMapCache` now support the serialization
663662
of cache entries via a new `storeByValue` attribute.
663+
* `@Cacheable`, `@CacheEvict`, `@CachePut`, and `@Caching` may now be used as
664+
_meta-annotations_ to create custom _composed annotations_ with attribute overrides.
664665

665666
=== JMS Improvements
666667

@@ -706,4 +707,3 @@ Spring 4.3 also improves the caching abstraction as follows:
706707
* Client-side REST test support allows indicating how many times a request is expected and
707708
whether the order of declaration for expectations should be ignored (see <<spring-mvc-test-client>>).
708709
* Client-side REST Test supports expectations for form data in the request body.
709-

0 commit comments

Comments
 (0)