def dump_cache(self, obj_uuids=None, count=10):
    obj_dicts = {}
    i = 1
    if obj_uuids:
        for obj_uuid in obj_uuids:
            try:
                obj = self._cache[obj_uuid]
            except KeyError:
                continue
            obj_json = json.dumps(obj, default=(lambda o: dict(((k, v) for (k, v) in list(o.__dict__.items())))))
            obj_dicts[i] = json.loads(obj_json)
            i += 1
    else:
        for key in self._cache:
            if (i > count):
                break
            obj = self._cache[key]
            obj_json = json.dumps(obj, default=(lambda o: dict(((k, v) for (k, v) in list(o.__dict__.items())))))
            obj_dicts[i] = json.loads(obj_json)
            i += 1
    return obj_dicts
def dump_cache(self, obj_uuids=None, count=10):
    obj_dicts = {}
    i = 1
    if obj_uuids:
        for obj_uuid in obj_uuids:
            try:
                obj = self._cache[obj_uuid]
            except KeyError:
                continue
            obj_json = json.dumps(obj, default=(lambda o: dict(((k, v) for (k, v) in list(o.__dict__.items())))))
            obj_dicts[i] = json.loads(obj_json)
            i += 1
    else:
        for key in self._cache:
            if (i > count):
                break
            obj = self._cache[key]
            obj_json = json.dumps(obj, default=(lambda o: dict(((k, v) for (k, v) in list(o.__dict__.items())))))
            obj_dicts[i] = json.loads(obj_json)
            i += 1
    return obj_dicts