added general cache class, as well as a simple LRU implementation of it