implement caching of cty.dat