Since we are unable to inspect the light to determine the cause of the issue, we cannot be sure if replacing the cap and toggle will fix the issue. But if the issue is related to the toggle then only it would need to be replaced and not the switch also.