Configuration of automatic cache clearing