modified KVCache.java