I just started with Redis Cache and more clear about it's concepts and functions.
My purpose is to cache few sql server database tables. Few C# applications are updating those tables frequently and few are reading those tables. Rather than serving each request from the database, I want to serve the request from the cache (read data from the cache, CRUD would directly happen on the database only). To support this scenario, one approach is,
- Cache all the tables using Redis Cache.
- Serve application get request from that cache.
- As and when any application update any table, update my cache accordingly and provide a fresh copy from the cache to reader.
Above approach is pretty straight forward with few challenges (which I can manage).
Per my experience, there must be some mechanism to Auto-synchronize database table with Redis cache so I don't have to update cache from different applications.
Any inputs on this?