added caching support. builtin supported caching strategies are LRU and LFU