Oral contraceptives significantly reduce risks of ovarian cancer in women, says a new large-scale study. The pill has been linked to reduction in breast cancer rates as well, but not so large as the reduction in ovarian cancer rates.
The risk reduction persists up to thirty years after a woman stops taking the pill, although it declines with time. The risk reduction is also stronger in women who take it for long periods of time.
Furthermore, as the linked article says:
The proportional risk reduction for every 5 years of use was 29 per cent up to 10 years of stopping use, 19 per cent for 10 – 19 years after stopping, and 15 per cent for 20 – 29 years after stopping.