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

...ain cache plugin without NoSuchBeanDefinitionExceptions.