I know my limitations as a recreational rider over 50. I also know my own, "engine." What works for me is to continue my speed (not cadence) as I start up the hill, downshifting and increasing cadence as I go. I will then slow my cadence down to my normal cruising cadence, knowing I did not blow out the immediate energy I had in my leg muscles and with my heart rate now up near my 80% point. I will spin until my muscles want a break, during this time my heart rate is dropping back to around 50% where I try to keep it. I'll upshift about 3 cogs and stand in the gear where my body weight lets the pedals fall at a comfortable cadence. My heart rate will start to rise again up to my 80% point (I stop there no matter what). I'll then drop gears and sit back down in spin. If it's a long hill I'll drop to a lower gear and spin with less effort to get myself up the hill with energy left in my legs.
I know that I need to keep enough left in me to be able to accelerate as I crest the hill. When I am at a good wind chill speed I'll spin with very light effort, letting my muscles recharge. By time I get back to the normal cruise on the flats, if I dialed in everything right, I'm back to my target 50% heart rate and normal cadence spin.