Evicting data

Some caches have a limited size and require a policy in order to evict data. In addition to this, some caches select the least recently-used data to evict. However, we can customize this policy, and we can even use our own logic for removing data from the cache. Generally, the logic used to remove data is limited in size, but we can also use logic regarding updates.

Evicting data is different to setting an expiration policy because the expiration policy is a static logic that removes data in a cache when it expires. Eviction data, however, involves dynamic logic. An expiration policy allows us to minimize the chance of getting a dirty reading, whereas evicting data allows us to create logic that minimizes the chance of the cache reaching its limit and optimizes the consistency of the cache data.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.7.102