Not so for spouses of British Citizens.
They only need to have lived in the UK 3 years before being eligible to apply and need to be free of immigration time restrictions (means hold ILR) on the date of their application.
Of course all the other stuff like Life in UK, B1 level English and residency requirements need to be met.