Skip to content

Commit eaed62d

Browse files
committed
Mention RedisCache locking behavior details.
Closes #1801.
1 parent ee9689d commit eaed62d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/asciidoc/reference/redis-cache.adoc

+5-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ RedisCacheConfiguration config = RedisCacheConfiguration.defaultCacheConfig()
3535
.disableCachingNullValues();
3636
----
3737

38-
`RedisCacheManager` defaults to a lock-free `RedisCacheWriter` for reading and writing binary values. Lock-free caching improves throughput. The lack of entry locking can lead to overlapping, non-atomic commands for the `putIfAbsent` and `clean` methods, as those require multiple commands to be sent to Redis. The locking counterpart prevents command overlap by setting an explicit lock key and checking against presence of this key, which leads to additional requests and potential command wait times.
38+
`RedisCacheManager` defaults to a lock-free `RedisCacheWriter` for reading and writing binary values.
39+
Lock-free caching improves throughput.
40+
The lack of entry locking can lead to overlapping, non-atomic commands for the `putIfAbsent` and `clean` methods, as those require multiple commands to be sent to Redis. The locking counterpart prevents command overlap by setting an explicit lock key and checking against presence of this key, which leads to additional requests and potential command wait times.
41+
42+
Locking applies on the *cache level*, not per *cache entry*.
3943

4044
It is possible to opt in to the locking behavior as follows:
4145

0 commit comments

Comments
 (0)