@@ -8275,13 +8275,13 @@ do yourself a favor and read <<expressions>>:
8275
8275
[source,java,indent=0]
8276
8276
[subs="verbatim,quotes"]
8277
8277
----
8278
- @Cacheable(value ="books", **key="#isbn"**)
8278
+ @Cacheable(cacheNames ="books", **key="#isbn"**)
8279
8279
public Book findBook(ISBN isbn, boolean checkWarehouse, boolean includeUsed)
8280
8280
8281
- @Cacheable(value ="books", **key="#isbn.rawNumber"**)
8281
+ @Cacheable(cacheNames ="books", **key="#isbn.rawNumber"**)
8282
8282
public Book findBook(ISBN isbn, boolean checkWarehouse, boolean includeUsed)
8283
8283
8284
- @Cacheable(value ="books", **key="T(someType).hash(#isbn)"**)
8284
+ @Cacheable(cacheNames ="books", **key="T(someType).hash(#isbn)"**)
8285
8285
public Book findBook(ISBN isbn, boolean checkWarehouse, boolean includeUsed)
8286
8286
----
8287
8287
@@ -8295,7 +8295,7 @@ this, specify the name of the `KeyGenerator` bean implementation to use:
8295
8295
[source,java,indent=0]
8296
8296
[subs="verbatim,quotes"]
8297
8297
----
8298
- @Cacheable(value ="books", **keyGenerator="myKeyGenerator"**)
8298
+ @Cacheable(cacheNames ="books", **keyGenerator="myKeyGenerator"**)
8299
8299
public Book findBook(ISBN isbn, boolean checkWarehouse, boolean includeUsed)
8300
8300
----
8301
8301
@@ -8329,7 +8329,7 @@ to set the `cacheManager` to use per operation:
8329
8329
[source,java,indent=0]
8330
8330
[subs="verbatim,quotes"]
8331
8331
----
8332
- @Cacheable(value ="books", **cacheManager="anotherCacheManager"**)
8332
+ @Cacheable(cacheNames ="books", **cacheManager="anotherCacheManager"**)
8333
8333
public Book findBook(ISBN isbn) {...}
8334
8334
----
8335
8335
@@ -8371,7 +8371,7 @@ only if the argument `name` has a length shorter than 32:
8371
8371
[source,java,indent=0]
8372
8372
[subs="verbatim,quotes"]
8373
8373
----
8374
- @Cacheable(value ="book", **condition="#name.length < 32"**)
8374
+ @Cacheable(cacheNames ="book", **condition="#name.length < 32"**)
8375
8375
public Book findBook(String name)
8376
8376
----
8377
8377
@@ -8383,7 +8383,7 @@ only want to cache paperback books:
8383
8383
[source,java,indent=0]
8384
8384
[subs="verbatim,quotes"]
8385
8385
----
8386
- @Cacheable(value ="book", condition="#name.length < 32", **unless="#result.hardback"**)
8386
+ @Cacheable(cacheNames ="book", condition="#name.length < 32", **unless="#result.hardback"**)
8387
8387
public Book findBook(String name)
8388
8388
----
8389
8389
@@ -8460,7 +8460,7 @@ than method flow optimization:
8460
8460
[source,java,indent=0]
8461
8461
[subs="verbatim,quotes"]
8462
8462
----
8463
- @CachePut(value ="book", key="#isbn")
8463
+ @CachePut(cacheNames ="book", key="#isbn")
8464
8464
public Book updateBook(ISBN isbn, BookDescriptor descriptor)
8465
8465
----
8466
8466
@@ -8494,7 +8494,7 @@ rather then just an entry one (based on the key):
8494
8494
[source,java,indent=0]
8495
8495
[subs="verbatim,quotes"]
8496
8496
----
8497
- @CacheEvict(value ="books", **allEntries=true**)
8497
+ @CacheEvict(cacheNames ="books", **allEntries=true**)
8498
8498
public void loadBooks(InputStream batch)
8499
8499
----
8500
8500
@@ -8533,7 +8533,7 @@ this case, `@Caching`. `@Caching` allows multiple nested `@Cacheable`, `@CachePu
8533
8533
[source,java,indent=0]
8534
8534
[subs="verbatim,quotes"]
8535
8535
----
8536
- @Caching(evict = { @CacheEvict("primary"), @CacheEvict(value ="secondary", key="#p0") })
8536
+ @Caching(evict = { @CacheEvict("primary"), @CacheEvict(cacheNames ="secondary", key="#p0") })
8537
8537
public Book importBooks(String deposit, Date date)
8538
8538
----
8539
8539
@@ -8753,7 +8753,7 @@ that is annotations that can annotate other annotations. To wit, let us replace
8753
8753
----
8754
8754
@Retention(RetentionPolicy.RUNTIME)
8755
8755
@Target({ElementType.METHOD})
8756
- @Cacheable(value ="books", key="#isbn")
8756
+ @Cacheable(cacheNames ="books", key="#isbn")
8757
8757
public @interface SlowService {
8758
8758
}
8759
8759
----
@@ -8764,7 +8764,7 @@ Above, we have defined our own `SlowService` annotation which itself is annotate
8764
8764
[source,java,indent=0]
8765
8765
[subs="verbatim,quotes"]
8766
8766
----
8767
- @Cacheable(value ="books", key="#isbn")
8767
+ @Cacheable(cacheNames ="books", key="#isbn")
8768
8768
public Book findBook(ISBN isbn, boolean checkWarehouse, boolean includeUsed)
8769
8769
----
8770
8770
@@ -8846,7 +8846,7 @@ possible to customize the factory per cache operation:
8846
8846
[source,java,indent=0]
8847
8847
[subs="verbatim,quotes"]
8848
8848
----
8849
- @CacheResult(value ="books", *cacheResolverFactory=MyCacheResolverFactory.class*)
8849
+ @CacheResult(cacheNames ="books", *cacheResolverFactory=MyCacheResolverFactory.class*)
8850
8850
public Book findBook(ISBN isbn)
8851
8851
----
8852
8852
@@ -8867,7 +8867,7 @@ abstraction and the other with JCache:
8867
8867
[source,java,indent=0]
8868
8868
[subs="verbatim,quotes"]
8869
8869
----
8870
- @Cacheable(value ="books", **key="#isbn"**)
8870
+ @Cacheable(cacheNames ="books", **key="#isbn"**)
8871
8871
public Book findBook(ISBN isbn, boolean checkWarehouse, boolean includeUsed)
8872
8872
8873
8873
@CacheResult(cacheName="books")
0 commit comments