The visitors had Townsend sent off when the on-loan Hull defender collected two yellow cards in the space of as many minutes as half-time loomed.
Although the Millers had two efforts cleared off the line and Carlisle goalkeeper Ben Amos made a series of good saves, Steve Evans' side just could not find a way past the Cumbrians' determined rear-guard action.
"It was a tremendous performance," said Kavanagh. "Great work rate, great honesty and great determination - especially after going down to 10 men.
"I think it was probably a sending off, but it was a bit naive to collect to yellow cards. Straight away after getting the first yellow, he gets a second one. But he is a young kid and I am sure he will learn from it.
"He has been outstanding in his loan spell with us and he has grown in confidence through his time here."
Kavanagh added: "Our performance in the second half on Tuesday night could well have been the turning point in our season and it gave everybody a boost so (Saturday) was an important fixture to see if we could continue with it and sustain it, and we just kept it going."
- Sports & Recreation