Updating cache as a separate method