Add redis: Boot 4.1 + Spring Data Redis 4.1, the JDK-serialisation default vs Jackson 3 serializers, @RedisHash TTL and keyspace events, @RedisListener, and Redis as the Spring cache
Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01B38FGKKam5SCGgwgduVAh3
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
# Same key name, two templates, two different keys
|
||||
|
||||
|
||||
--- Write user:1 with StringRedisTemplate ---
|
||||
stringTemplate.opsForValue().get("user:1") = from-string-template
|
||||
redisTemplate.opsForValue().get("user:1") = null
|
||||
|
||||
--- Write user:1 with the default RedisTemplate ---
|
||||
stringTemplate.opsForValue().get("user:1") = from-string-template
|
||||
redisTemplate.opsForValue().get("user:1") = from-default-template
|
||||
|
||||
--- What Redis holds ---
|
||||
$ redis-cli -p 6390 --no-raw DBSIZE
|
||||
(integer) 2
|
||||
$ redis-cli -p 6390 --no-raw GET user:1
|
||||
"from-string-template"
|
||||
Reference in New Issue
Block a user