Beispiel #1
0
def set(key, obj, expire=CACHE_SECONDS):
    value = cPickle.dumps(obj, HIGHEST_PROTOCOL)
    redis_client.set(key, value)
    if expire:
        redis_client.expire(key, expire)
Beispiel #2
0
def set(key, obj, expire=CACHE_SECONDS):
    value = cPickle.dumps(obj, HIGHEST_PROTOCOL)
    redis_client.set(key, value)
    if expire:
        redis_client.expire(key, expire)
Beispiel #3
0
def publish_to_char(char_id, msg):
    key = keygen(char_id)
    redis_client.rpush(key, msg)
    redis_client.expire(key, EXPIRE)
 def refresh(self):
     redis_client.expire(self.key, PLAYER_SESSION_EXPIRE)
Beispiel #5
0
def publish_to_char(char_id, msg):
    key = keygen(char_id)
    redis_client.rpush(key, msg)
    redis_client.expire(key, EXPIRE)