Improve cached configuration check