Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01B38FGKKam5SCGgwgduVAh3
16 lines
508 B
Plaintext
16 lines
508 B
Plaintext
# Redis as the Spring cache with a Jackson 3 value serializer
|
|
|
|
|
|
--- The result that was not Serializable now caches ---
|
|
find(1) called twice, method body ran 1 time(s)
|
|
second call returned: User[id=1, name=Ankur]
|
|
|
|
--- What is in Redis ---
|
|
$ redis-cli -p 6390 KEYS '*' | sort
|
|
users::1
|
|
$ redis-cli -p 6390 GET users::1
|
|
{"@class":"com.ankurm.redis.model.User","id":1,"name":"Ankur"}
|
|
$ redis-cli -p 6390 --no-raw TTL users::1
|
|
(integer) 300
|
|
spring.cache.redis.time-to-live=10m is set, and the bean says 5 minutes
|