public boolean shouldReadBlockFromCache(BlockType blockType) {
    if (cacheDataOnRead) {
      return true;
    }
    if (prefetchOnOpen) {
      return true;
    }
    if (cacheDataOnWrite) {
      return true;
    }
    if (blockType == null) {
      return true;
    }
    if (
      blockType.getCategory() == BlockCategory.BLOOM
        || blockType.getCategory() == BlockCategory.INDEX
    ) {
      return true;
    }
    return false;
  }
Return true if we may find this type of block in block cache.
<p>
TODO: today {@code family.isBlockCacheEnabled()} only means {@code cacheDataOnRead}, so here we
consider lots of other configurations such as {@code cacheDataOnWrite}. We should fix this in
the future, {@code cacheDataOnWrite} should honor the CF level {@code isBlockCacheEnabled}
configuration.
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheConfig.java