I don't know whether you're experienced or just started out cycling, so please ignore this if it should sound patronising
- Keep legs up high at night to reduce swelling!
- Play around with saddle height and position of spd clips on pedals etc...
- Using a higher gear will enable you to pedal faster and lighter = takes pressure of the knee. Using the heavy gears, especially in hilly terrain, will most likely make it even worse.
- If it was me I would probably try and take a walk to get alternative exercise, but dunno whether that's the right thing to do.
Hope this helps... You would probably receive better advice if you wrote where and when it hurts. While pedaling down or up? Does it hurt when you walk?
Best wishes.