Added ignore and optional API. Fixed the cancel refresh issue.