There does not seem to be any residential requirement when on a spouse visa.

The residential requirement is only when you are applying for British Citizenship, which states that: -

In order to demonstrate the residential requirements for naturalisation you need to:
  • have been resident in the United Kingdom for at least three years (this is known as the residential qualifying period); and
  • have been present in the United Kingdom three years before the date of your application; and
  • have not spent more than 270 days outside the United Kingdom during the three-year period; and
  • have not spend more than 90 days outside the United Kingdom in the last 12 months of the three-year period; and
  • have not been in breach of the immigration rules at any stage during the three-year period.



Regarding travel to Spain, you would need to apply for a schengen visa http://www.theschengenoffice.com/spain_embassy.html