I struggled with it for several years. I finally had to make myself take an extended break. That seemed to do the absolute best. I kept working out with TKEs (lightly) and took about 2 months off from playing. And then when I started playing again I started lightly, only 1-2x a week. I'm still in that phase right now, but some times I play 3x a week. But I never play on back to back days now. So far, my knees have been fantasically pain free. I'm enjoying basketball once again. If my knees start feeling strong enough again, I plan on starting to try to squat again (extremely lightly). But we'll see.
Also, just daily stuff. Icing, stretching, warming up properly and warming up enough. Also, I was given some stuff from my doctor called Voltaren gel (spelling may be off a bit). Basically, it's a gel form of aspirin (in a nutshell, obviously not the exact same). But you rub it in directly on your knee (I put it on my knee caps and surrounding area since that's where my pain was). And that does AMAZINGLY. I think you can just buy it over the counter now. I thought I saw it in the grocery store drug section the other day. It works very well.