'Reminder : cached method should be return record, since they will use a closed cursor.'

@tools.cache('domain_name')
def _get_current_website_id(self, domain_name):

    website = self.search([('domain', '=', domain_name)], limit=1)
    if (not website):
        website = self.search([], limit=1)
    return website.id
