def delete(self, id): token = self.get(id) if token != None: MEMCACHE_SERVER.delete(id) if token != None and not hasattr(token, 'tenant_id'): token.tenant_id = None if token.tenant_id != None: MEMCACHE_SERVER.delete(token.tenant_id + "::" + token.user_id) else: MEMCACHE_SERVER.delete(token.id) MEMCACHE_SERVER.delete(token.user_id)
def delete(self, id): token = self.get(id) if token is not None: MEMCACHE_SERVER.delete(id) if token is not None and not hasattr(token, 'tenant_id'): token.tenant_id = None if token.tenant_id is not None: MEMCACHE_SERVER.delete("%s::%s" % (token.tenant_id, token.user_id)) else: MEMCACHE_SERVER.delete(token.id) MEMCACHE_SERVER.delete("U%s" % token.user_id)