Attachment is not necessary for compassion, only the ability to recognize and open oneself to suffering. For those who recognize the interdependence of all beings and the illusory nature of all mind-fabricated separations, compassion is a natural correlate. In fact, cruelty and indifference are inconsistent with these realizations.
This is because there is no real barrier keeping out ‘your suffering’ from ‘my suffering’; there is only suffering, and we strive to meet it with caring and understanding on a level of equality. This is what we mean by compassion.
With that said, we still sometimes catch ourselves shutting suffering out, especially when it is on a staggering scale as in the developing nations of the world. Mindfulness helps us to catch ourselves doing just this and detached inquiry helps to reveal why we tend to do it. Usually, there is a wish to preserve ‘my’ happiness from the overwhelming level of ‘others’ suffering; this suggests both a lingering attachment and a subtle vestige of egotism. These colorings suppress the compassion that would otherwise arise. When we recognize them, we can learn to see through them and cultivate that compassion once more.
Even when we feel we are powerless in a situation, we can at least care. Compassion is always better than indifference.