Add config checking for caching