@lru_cache(1024)
def get_block(env, blockhash):
 assert isinstance(env, Env)
 blk = rlp.decode(env.db.get(blockhash), Block, env=env)
 return CachedBlock.create_cached(blk)

@ lru_cache ( 1024 ) def get_block ( env , blockhash ) : assert isinstance ( env , Env ) blk = rlp . decode ( env . db . get ( blockhash ) , Block , env = env ) return CachedBlock . create_cached ( blk )
assumption: blocks loaded from the db are not manipulated -> can be cached including hash .