Implemented all methods in KVCache.java