def object_read(self, obj_type, obj_uuids, field_names=None, ret_readonly=False):
    if (not obj_uuids):
        return (True, [])
    req_fields = field_names
    obj_class = self._get_resource_class(obj_type)
    ref_fields = obj_class.ref_fields
    backref_fields = obj_class.backref_fields
    children_fields = obj_class.children_fields
    list_fields = obj_class.prop_list_fields
    map_fields = obj_class.prop_map_fields
    prop_fields = (obj_class.prop_fields - (list_fields | map_fields))
    if ((ret_readonly is False) or (obj_type in self._obj_cache_exclude_types)):
        ignore_cache = True
    else:
        ignore_cache = False
    if ((field_names is None) or (set(field_names) & (backref_fields | children_fields))):
        include_backrefs_children = True
        if ignore_cache:
            hit_obj_dicts = []
            miss_uuids = obj_uuids
        else:
            (hit_obj_dicts, miss_uuids) = self._obj_cache_mgr.read(obj_class, obj_uuids, field_names, include_backrefs_children)
        miss_obj_rows = self._cassandra_driver.multiget(datastore_api.OBJ_UUID_CF_NAME, miss_uuids, timestamp=True)
    else:
        include_backrefs_children = False
        if ignore_cache:
            hit_obj_dicts = []
            miss_uuids = obj_uuids
        else:
            (hit_obj_dicts, miss_uuids) = self._obj_cache_mgr.read(obj_class, obj_uuids, field_names, include_backrefs_children)
        miss_obj_rows = self._cassandra_driver.multiget(datastore_api.OBJ_UUID_CF_NAME, miss_uuids, start='d', timestamp=True)
    if (ignore_cache or (self._obj_cache_mgr.max_entries < len(miss_uuids))):
        rendered_objs = self._render_obj_from_db(obj_class, miss_obj_rows, req_fields, include_backrefs_children)
        obj_dicts = (hit_obj_dicts + [v['obj_dict'] for (k, v) in list(rendered_objs.items())])
    else:
        rendered_objs_to_cache = self._render_obj_from_db(obj_class, miss_obj_rows, None, include_backrefs_children)
        field_filtered_objs = self._obj_cache_mgr.set(obj_type, rendered_objs_to_cache, req_fields, include_backrefs_children)
        obj_dicts = (hit_obj_dicts + field_filtered_objs)
    if (not obj_dicts):
        if (len(obj_uuids) == 1):
            raise NoIdError(obj_uuids[0])
        else:
            return (True, [])
    return (True, obj_dicts)
def object_read(self, obj_type, obj_uuids, field_names=None, ret_readonly=False):
    if (not obj_uuids):
        return (True, [])
    req_fields = field_names
    obj_class = self._get_resource_class(obj_type)
    ref_fields = obj_class.ref_fields
    backref_fields = obj_class.backref_fields
    children_fields = obj_class.children_fields
    list_fields = obj_class.prop_list_fields
    map_fields = obj_class.prop_map_fields
    prop_fields = (obj_class.prop_fields - (list_fields | map_fields))
    if ((ret_readonly is False) or (obj_type in self._obj_cache_exclude_types)):
        ignore_cache = True
    else:
        ignore_cache = False
    if ((field_names is None) or (set(field_names) & (backref_fields | children_fields))):
        include_backrefs_children = True
        if ignore_cache:
            hit_obj_dicts = []
            miss_uuids = obj_uuids
        else:
            (hit_obj_dicts, miss_uuids) = self._obj_cache_mgr.read(obj_class, obj_uuids, field_names, include_backrefs_children)
        miss_obj_rows = self._cassandra_driver.multiget(datastore_api.OBJ_UUID_CF_NAME, miss_uuids, timestamp=True)
    else:
        include_backrefs_children = False
        if ignore_cache:
            hit_obj_dicts = []
            miss_uuids = obj_uuids
        else:
            (hit_obj_dicts, miss_uuids) = self._obj_cache_mgr.read(obj_class, obj_uuids, field_names, include_backrefs_children)
        miss_obj_rows = self._cassandra_driver.multiget(datastore_api.OBJ_UUID_CF_NAME, miss_uuids, start='d', timestamp=True)
    if (ignore_cache or (self._obj_cache_mgr.max_entries < len(miss_uuids))):
        rendered_objs = self._render_obj_from_db(obj_class, miss_obj_rows, req_fields, include_backrefs_children)
        obj_dicts = (hit_obj_dicts + [v['obj_dict'] for (k, v) in list(rendered_objs.items())])
    else:
        rendered_objs_to_cache = self._render_obj_from_db(obj_class, miss_obj_rows, None, include_backrefs_children)
        field_filtered_objs = self._obj_cache_mgr.set(obj_type, rendered_objs_to_cache, req_fields, include_backrefs_children)
        obj_dicts = (hit_obj_dicts + field_filtered_objs)
    if (not obj_dicts):
        if (len(obj_uuids) == 1):
            raise NoIdError(obj_uuids[0])
        else:
            return (True, [])
    return (True, obj_dicts)