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