Added check that the cache is enabled.