def read(self, obj_class, obj_uuids, req_fields, include_backrefs_children):
    hit_uuids = []
    miss_uuids = []
    for obj_uuid in obj_uuids:
        if (obj_uuid in self._cache):
            hit_uuids.append(obj_uuid)
        else:
            miss_uuids.append(obj_uuid)
    stale_uuids = []
    if include_backrefs_children:
        stale_check_col_name = 'META:latest_col_ts'
        stale_check_ts_attr = 'row_latest_ts'
    else:
        stale_check_col_name = 'prop:id_perms'
        stale_check_ts_attr = 'id_perms_ts'
    hit_rows_in_db = self._db_client._cassandra_driver.multiget(datastore_api.OBJ_UUID_CF_NAME, hit_uuids, columns=[stale_check_col_name], timestamp=True)
    obj_dicts = []
    result_fields = {'fq_name', 'uuid', 'parent_type', 'parent_uuid'}
    if req_fields:
        result_fields = (set(req_fields) | result_fields)
    for hit_uuid in hit_uuids:
        try:
            obj_cols = hit_rows_in_db[hit_uuid]
            cached_obj = self._cache[hit_uuid]
        except KeyError:
            miss_uuids.append(hit_uuid)
            continue
        if (getattr(cached_obj, stale_check_ts_attr) != obj_cols[stale_check_col_name][1]):
            miss_uuids.append(hit_uuid)
            stale_uuids.append(hit_uuid)
            continue
        if req_fields:
            obj_dicts.append(cached_obj.get_filtered_copy(result_fields))
        else:
            obj_dicts.append(cached_obj.get_filtered_copy())
        if (obj_class.object_type in self._debug_obj_cache_types):
            obj_rows = self._db_client._cassandra_driver.multiget(datastore_api.OBJ_UUID_CF_NAME, [hit_uuid], timestamp=True)
            rendered_objs = self._db_client._render_obj_from_db(obj_class, obj_rows, req_fields, include_backrefs_children)
            db_obj_dict = rendered_objs[hit_uuid]['obj_dict']
            self._log(('%s %s (%s) was read from cache.\nDB values: %s\nCache value: %s\n' % (obj_class.object_type.replace('_', ' ').title(), ':'.join(cached_obj.obj_dict['fq_name']), hit_uuid, pformat(db_obj_dict), pformat(cached_obj.obj_dict))))
    self.evict(obj_class.object_type, stale_uuids)
    return (obj_dicts, miss_uuids)
def read(self, obj_class, obj_uuids, req_fields, include_backrefs_children):
    hit_uuids = []
    miss_uuids = []
    for obj_uuid in obj_uuids:
        if (obj_uuid in self._cache):
            hit_uuids.append(obj_uuid)
        else:
            miss_uuids.append(obj_uuid)
    stale_uuids = []
    if include_backrefs_children:
        stale_check_col_name = 'META:latest_col_ts'
        stale_check_ts_attr = 'row_latest_ts'
    else:
        stale_check_col_name = 'prop:id_perms'
        stale_check_ts_attr = 'id_perms_ts'
    hit_rows_in_db = self._db_client._cassandra_driver.multiget(datastore_api.OBJ_UUID_CF_NAME, hit_uuids, columns=[stale_check_col_name], timestamp=True)
    obj_dicts = []
    result_fields = {'fq_name', 'uuid', 'parent_type', 'parent_uuid'}
    if req_fields:
        result_fields = (set(req_fields) | result_fields)
    for hit_uuid in hit_uuids:
        try:
            obj_cols = hit_rows_in_db[hit_uuid]
            cached_obj = self._cache[hit_uuid]
        except KeyError:
            miss_uuids.append(hit_uuid)
            continue
        if (getattr(cached_obj, stale_check_ts_attr) != obj_cols[stale_check_col_name][1]):
            miss_uuids.append(hit_uuid)
            stale_uuids.append(hit_uuid)
            continue
        if req_fields:
            obj_dicts.append(cached_obj.get_filtered_copy(result_fields))
        else:
            obj_dicts.append(cached_obj.get_filtered_copy())
        if (obj_class.object_type in self._debug_obj_cache_types):
            obj_rows = self._db_client._cassandra_driver.multiget(datastore_api.OBJ_UUID_CF_NAME, [hit_uuid], timestamp=True)
            rendered_objs = self._db_client._render_obj_from_db(obj_class, obj_rows, req_fields, include_backrefs_children)
            db_obj_dict = rendered_objs[hit_uuid]['obj_dict']
            self._log(('%s %s (%s) was read from cache.\nDB values: %s\nCache value: %s\n' % (obj_class.object_type.replace('_', ' ').title(), ':'.join(cached_obj.obj_dict['fq_name']), hit_uuid, pformat(db_obj_dict), pformat(cached_obj.obj_dict))))
    self.evict(obj_class.object_type, stale_uuids)
    return (obj_dicts, miss_uuids)