Support memory cache and disk cache