Refactor the Cache Configurator so we can reuse it from different locations