Add enable check to avoid NoSuchBeanDefinitionExceptions when setting enabled=false in the main cache plugin.

...ain cache plugin without NoSuchBeanDefinitionExceptions.