The cache policy has been studied a lot. For the basic concepts, see
Wikipedia Cache
In hbase, cache is divided into three types:
1. inmemory: it is expected that its content can be stored in memory.
2. Single: Put the accessed block here
3. multi: Put the block accessed more than once here
Inmemory is easy to understand. Some meta data in the system is frequently accessed, and the size is small, it is a reasonable idea to make it resident memory instead of being replaced by the memory size limit.
The emergence of single and multi is to avoid the impact of scan. Imagine if the cache size is set to 100 m, and the data size of one scan is 200 m, then all the data in the cache will be remvoed, but the block that fill enters into the cache will never be accessed for the second time (SCAN semantics), which is a waste.
The core idea of the above idea is to classify the cache, instead of affecting each other by staying in the cache layer.ArticleThis idea is summarized (with different ideas ):
Lirs: Low inter-reference recency set replacement for VM and buffer caches...