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
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
def get(self, *args): key = self.key_pattern%args return mc.get_msgpack(key)