diff --git a/caffeine/src/main/java/com/github/benmanes/caffeine/cache/AsyncCache.java b/caffeine/src/main/java/com/github/benmanes/caffeine/cache/AsyncCache.java index 0cbb3dbcff..8efae8e5fd 100644 --- a/caffeine/src/main/java/com/github/benmanes/caffeine/cache/AsyncCache.java +++ b/caffeine/src/main/java/com/github/benmanes/caffeine/cache/AsyncCache.java @@ -105,8 +105,9 @@ CompletableFuture get(K key, BiFunction * A single request to the {@code mappingFunction} is performed for all keys which are not already * present in the cache. If another call to {@link #get} tries to load the value for a key in - * {@code keys}, that thread retrieves a future that is completed by this bulk computation. Note - * that multiple threads can concurrently load values for distinct keys. + * {@code keys}, that thread retrieves a future that is completed by this bulk computation. Any + * loaded values for keys that were not specifically requested will not be returned, but will be + * stored in the cache. Note that multiple threads can concurrently load values for distinct keys. *

* Note that duplicate elements in {@code keys}, as determined by {@link Object#equals}, will be * ignored. @@ -131,8 +132,9 @@ CompletableFuture> getAll(Iterable keys, *

* A single request to the {@code mappingFunction} is performed for all keys which are not already * present in the cache. If another call to {@link #get} tries to load the value for a key in - * {@code keys}, that thread retrieves a future that is completed by this bulk computation. Note - * that multiple threads can concurrently load values for distinct keys. + * {@code keys}, that thread retrieves a future that is completed by this bulk computation. Any + * loaded values for keys that were not specifically requested will not be returned, but will be + * stored in the cache. Note that multiple threads can concurrently load values for distinct keys. *

* Note that duplicate elements in {@code keys}, as determined by {@link Object#equals}, will be * ignored. diff --git a/caffeine/src/main/java/com/github/benmanes/caffeine/cache/Cache.java b/caffeine/src/main/java/com/github/benmanes/caffeine/cache/Cache.java index e91e8916d8..acc3108892 100644 --- a/caffeine/src/main/java/com/github/benmanes/caffeine/cache/Cache.java +++ b/caffeine/src/main/java/com/github/benmanes/caffeine/cache/Cache.java @@ -105,7 +105,9 @@ public interface Cache { * the value for a key in {@code keys}, implementations may either have that thread load the entry * or simply wait for this thread to finish and return the loaded value. In the case of * overlapping non-blocking loads, the last load to complete will replace the existing entry. Note - * that multiple threads can concurrently load values for distinct keys. + * that multiple threads can concurrently load values for distinct keys. Any loaded values for + * keys that were not specifically requested will not be returned, but will be stored in the + * cache. *

* Note that duplicate elements in {@code keys}, as determined by {@link Object#equals}, will be * ignored.