Update Cache.php

Checking for success before assuming success