Added CacheFactory and updated module.config to rely upon the factory instead of a closure