added a method to make a decision whether the given key is already cached