fix delete_cache when add_user_to_key is True