move some caching info+logic out of .travis.yml; fixes #13136