RKh
RKh

Reputation: 14159

Updating cache automatically

I want to use Redis Cache. I want to store some data but it needs to be refreshed automatically at regular intervals.

If I have 100 rows and if any row has been updated in Cosmos DB, the row should get updated.

I want to know how to smoothly achieve this. Do I need to update the cache manually?

Upvotes: 1

Views: 158

Answers (1)

MD Ruhul Amin
MD Ruhul Amin

Reputation: 4492

I want to know how to smoothly achieve this. Do I need to update the cache manually?

Redis has no idea if the data has been updated in somewhere else. Yes, you need to do it manually.

Your client/application which is updating the main-DB should also invalidate/update Redis cache(key corresponding to updated data) accordingly.

Upvotes: 2

Related Questions