There are several caching strategies that can be used in
distributed microservices:
▪ Cache Aside
▪ Read-Through
▪ Write-Through
▪ Write-Back, Write-Behind
▪ Cache Aside Strategy
Client checking the cache for data before making a request to
the backend service. When microservices needs to read data
from the database, it checks the cache first to determine
whether the data is available.
▪ If the data is available (a cache hit), the cached data is
returned. If the data isn’t available (a cache miss), the
database is queried for the data.
▪ The client will retrieve the data from the backend service and
store it in the cache for future requests.
▪ Data is lazy loaded into cache by client application.
https://medium.com/an-idea/a-quick-introduction-to-distributed-caching-b6170d6b6208