diff --git a/src/main/java/org/springframework/data/redis/cache/RedisCache.java b/src/main/java/org/springframework/data/redis/cache/RedisCache.java index 38989f209..d8f6ccbef 100644 --- a/src/main/java/org/springframework/data/redis/cache/RedisCache.java +++ b/src/main/java/org/springframework/data/redis/cache/RedisCache.java @@ -293,11 +293,7 @@ public class RedisCache extends AbstractValueAdaptingCache { @SuppressWarnings("unchecked") public CompletableFuture retrieve(Object key, Supplier> valueLoader) { - if (!getCacheWriter().supportsAsyncRetrieve()) { - throw new UnsupportedOperationException(CACHE_RETRIEVAL_UNSUPPORTED_OPERATION_EXCEPTION_MESSAGE); - } - - return retrieveValue(key).thenCompose(wrapper -> { + return retrieve(key).thenCompose(wrapper -> { if (wrapper != null) { return CompletableFuture.completedFuture((T) wrapper.get());