I broke my kneecap about 15 years ago and its constantly swollen. When I started cycling again ignored stretching and paid the price. My muscles in the leg with the bad knee went all out of alignment. Because one leg was stronger than the other the strong leg compensated for the weak. A visit to a physio sorted it. As for exercises – squats, step ups, lie on your bed on your front, with your legs hanging off the end horizontal from the hip and raise them one at a time, and lie on your side with your bad knee on top; bend both legs at the hips and knees and then imagine your knees strapped together; raise and lower your foot. One final piece of advice from my doctor – keep riding – it’ll lengthen your life, your knee may hurt though