How to sync client-side/local cache with distributed cache like Redis

Praveen Mekala
Nerd For Tech
Published in
1 min readSep 21, 2020

--

Few applications architecture requires the combination of both client-side(local) cache and distributed cache like Redis. This hybrid solution is to reduce the network calls or database calls and to give better performance obviously.

The main challenge here is to maintain uniformity across the actual data, client-side(local) cache & distributed cache. There is no standard solution that effectively solves this hybrid solution associated issues like in-memory optimizations, broadcast modes.

Redis 6.0.0 has released a feature i.e Redis server-assisted client-side caching with Client Tracking command. Since it’s a newly released feature Redis supported java clients like Jedis, Radisson yet to provide support for this feature. This might be the same case with other languages.

If you want to know complete details about Client Tracking command, the following are the best resources.

  1. https://redis.io/topics/client-side-caching
  2. https://redis.io/commands/client-tracking
  3. https://www.youtube.com/watch?v=fcgFT1Nca14&ab_channel=RedisLabs

Hopefully, I will create a POC & share you in my next article.

--

--