revised cache set bug