Implement cache for versions.