Lazy loading loads data into cache only when necessary. Write through adds data or updates data in the cache whenever data is written to the database.Lazy loading allows for stale data ,but wont fail with empty nodes and may populate the cache with superfluous data, a problem referred to as “cache churn” .
Adding a time to live (TTL) value to each write allows us to enjoy the advantages of each strategy and avoid cluttering up the cache with superfluous data. Unrelated to these issues is consistent hashing, which is technique used to partition data keys between nodes in cluster.