Factored out persistent cache from GradleModelLoader.