예제 #1
0
 def mc_get(cls, id):
     if id:
         key = str(cls.__key__%id)
         value = mc.get_msgpack(key, cls._loads)
         if value is None:
             value = cls.get(id)
             if value:
                 value.mc_set()
         return value
예제 #2
0
 def mc_get(cls, id):
     if id:
         key = str(cls.__key__ % id)
         value = mc.get_msgpack(key, cls._loads)
         if value is None:
             value = cls.get(id)
             if value:
                 value.mc_set()
         return value
예제 #3
0
 def get(self, *args):
     key = self.key_pattern%args
     return mc.get_msgpack(key)