unify the cache in LRU and LFU