Added a cache interface and made MemCache implement it