def set_preferred(self, preferred_addr, addr_1, addr_2):
        '''Set the preferred address.'''
        if addr_1 > addr_2:
            addr_1, addr_2 = addr_2, addr_1

        self._cache[(addr_1, addr_2)] = preferred_addr
Set the preferred address.