Exemple #1
0
    def create(self, token):
        if not hasattr(token, 'tenant_id'):
            token.tenant_id = None
        if token.tenant_id != None:
            tenant_user_key = token.tenant_id + "::" + token.user_id
        else:
            tenant_user_key = token.user_id

        MEMCACHE_SERVER.set(token.id, token)
        MEMCACHE_SERVER.set(tenant_user_key, token)
Exemple #2
0
    def create(self, token):
        if not hasattr(token, 'tenant_id'):
            token.tenant_id = None
        if token.tenant_id != None:
            tenant_user_key = token.tenant_id + "::" + token.user_id
        else:
            tenant_user_key = token.user_id

        MEMCACHE_SERVER.set(token.id, token)
        MEMCACHE_SERVER.set(tenant_user_key, token)
Exemple #3
0
    def create(self, token):
        if not hasattr(token, 'tenant_id'):
            token.tenant_id = None
        if token.tenant_id is not None:
            tenant_user_key = "%s::%s" % (token.tenant_id, token.user_id)
        else:
            tenant_user_key = "U%s" % token.user_id

        MEMCACHE_SERVER.set(token.id, token)
        MEMCACHE_SERVER.set(tenant_user_key, token)
Exemple #4
0
    def create(self, token):
        if not hasattr(token, 'tenant_id'):
            token.tenant_id = None
        if token.tenant_id is not None:
            tenant_user_key = "%s::%s" % (token.tenant_id, token.user_id)
        else:
            tenant_user_key = "U%s" % token.user_id

        MEMCACHE_SERVER.set(token.id, token)
        MEMCACHE_SERVER.set(tenant_user_key, token)