Add caching to the new config class.