IDR doesn’t reset the clock - you can go in & out of plans. Same with PSLF. But IDR forgiveness is, as @brantly correctly points out, taxable in the year it’s forgiven. That can be a huge tax hit. PSLF forgiveness is not taxable, but there is no guarantee that a borrower will be able to get through all 120 eligible payments in an eligible job, much less be able to stay in an eligible job until the forgiveness is actually processed (this can take many months). I advise my students to try to pay off loans as quickly as possible.