Hi,
I'm trying to implement client-side caching in Redis, as described in the Redis documentation (https://redis.io/docs/manual/client-side-caching/#the-redis-implementation-of-client-side-caching), but I'm having trouble finding the steps to enable this feature.
I've read through the documentation but I can't seem to find any clear instructions on how to enable client-side caching. Can you provide me with some guidance or point me to the right resources to enable this feature?
Thank you for your help, and I look forward to hearing back from you soon.
Comment From: itamarhaber
Hi @rick020
To use CSC with Redis running out of the box, you only need to call CLIENT TRACKING for each "caching" connection.
Here's a CLI example that show's tracked key's invalidation message:
❯ redis-cli -3
127.0.0.1:6379> CLIENT TRACKING ON
OK
127.0.0.1:6379> GET mykey
(nil)
127.0.0.1:6379> SET mykey somevalue
OK
127.0.0.1:6379> PING
-> invalidate: 'mykey'
PONG