Correct documentation for upgrade(), fix cache check