'Sets the last search date for the current provider in the cache database
:param to_date: date to set to, or None for today'

def set_last_search(self, to_date=None):

    if (not to_date):
        to_date = datetime.datetime.today()
    cache_db_con = self._get_db()
    cache_db_con.upsert(u'lastSearch', {u'time': int(time.mktime(to_date.timetuple()))}, {u'provider': self.provider_id})
