you cannot be out of the UK 2yrs years or more in one trip or you will lose your ILR
and you would have to apply for FLR instead or ILR in certain circumstances, like you couldn't pass the 'life in UK test b4 your current visa expired' or you came to the uk say 4 or 5 months after your spouse visa was issued.