I have a cleaning regimen that seems to work.
1. When a keg gets empty I flush it several times with tap water (swirling), and then put about a gallon of tap water in, attach the lid, and shake it a bunch of times. Then I push the water into a waste vessel using CO2 and the out post. At that point I do one more rinse, add another gallon of water, and let it sit for several days. My water is alkaline (no, I don't use it to brew), and it seems to remove most of the remaining gunk.
2. The second stage is a prolonged soak using 5 gallons of 0.2M tri-sodium phosphate. TSP is an alkaline cleaner best noted for removing paint, but it works wonders on whatever gunk remains in the keg. A keg that has been cleaned in this fashion has a beautiful frosty stainless steel appearance inside!
3. After a week or two I rinse the keg as in step 1, and fill it with 5 gallons of StarSan. It will stay in the StarSan until I push another keg through the cleaning station.
At any given time I have three kegs in the cleaning station: One with water, the next is full of TSP, and the third is full of StarSan. I change the TSP when it begins to look brown'ish, and the StarSan every other month. I have been doing this for about 5 years, and so far so good. ;-)
Charlie