Beispiel #1
0
 def get_current_user(self):
     #if not self.current_user:
     uuid = self.get_cookie(config.SOCRightConfig['rightCookieName'])
     if None == uuid:
         return None
     user = redis_cache.getObj(uuid)
     return user
Beispiel #2
0
 def get_current_user(self):
     #if not self.current_user:
     uuid = self.get_cookie(config.SOCRightConfig['rightCookieName'])
     if None == uuid:
         return None
     user = redis_cache.getObj(uuid)
     return user
Beispiel #3
0
def query_user_by_name_cache( name):
    key = _user_by_name_key % name
    user = redis_cache.getObj(key)
    if None == user:
        user = query_one_by_name(name = name)            
        redis_cache.setObj(key = key, val = user, time = config.cache['apiTimeOut'])
    return user