You can only stay outside the UK for 6 months in any 12-month period to be eligible for the settlement. The cumulative total of absences in any 12-month period must not exceed 180 days if you are on a spouse visa.