Skip to content

Commit d7f086d

Browse files
authored
Merge pull request #9659 from velias/patch-1
Cache doc improvement to better describe behaviors
2 parents 32e430f + 6e82dee commit d7f086d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/src/main/asciidoc/cache.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ Loads a method result from the cache without executing the method body whenever
282282

283283
When a method annotated with `@CacheResult` is invoked, Quarkus will compute a cache key and use it to check in the cache whether the method has been already invoked.
284284
If the method has one or more arguments, the key computation is done from all the method arguments if none of them is annotated with `@CacheKey`, or all the arguments annotated with `@CacheKey` otherwise.
285+
Each non-primitive method argument that is part of the key must implement `equals()` and `hashCode()` correctly for the cache to work as expected.
285286
This annotation can also be used on a method with no arguments, a default key derived from the cache name is generated in that case.
286287
If a value is found in the cache, it is returned and the annotated method is never actually executed.
287288
If no value is found, the annotated method is invoked and the returned value is stored in the cache using the computed or generated key.
@@ -328,7 +329,7 @@ Caffeine is a high performance, near optimal caching library.
328329
=== Caffeine configuration properties
329330

330331
Each of the Caffeine caches backing up the Quarkus application data caching extension can be configured using the following
331-
properties in the `application.properties` file.
332+
properties in the `application.properties` file. By default caches do not perform any type of eviction if not configured.
332333

333334
[TIP]
334335
====
@@ -485,4 +486,3 @@ public class CachedService {
485486
----
486487
<1> This method can be used to force a refresh of the cache entry corresponding to the given key.
487488
<2> This method will invalidate all entries from the `foo` and `bar` caches with a single call.
488-

0 commit comments

Comments
 (0)