'Get the current state event ids for a room based on the
current_state_events table.
Args:
room_id (str)
Returns:
deferred: dict of (type, state_key) -> event_id'

@cached(max_entries=100000, iterable=True)
def get_current_state_ids(self, room_id):

    def _get_current_state_ids_txn(txn):
        txn.execute('SELECT    type,    state_key,    event_id    FROM    current_state_events\n                                                                WHERE    room_id    =    ?\n                                                                ', (room_id,))
        return {(intern_string(r[0]), intern_string(r[1])): to_ascii(r[2]) for r in txn}
    return self.runInteraction('get_current_state_ids', _get_current_state_ids_txn)
