cache thrift_file load

cache thrift_file load
use `with` context for read