<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_consensus_info(self):
 """ Get block height and consensus hash. Try the cache, and on cache miss, fetch from the db """

        cached_consensus_info = self.get_cached_consensus_info()
        if cached_consensus_info:
            return cached_consensus_info

        db = get_db_state(self.working_dir)
        ch = db.get_current_consensus()
        block = db.get_current_block()
        db.close()

        cinfo = {'consensus_hash': ch, 'block_height': block}
        self.set_cached_consensus_info(cinfo)
        return cinfo