throw exception instead of returning false in updateCache function