Devices for cooling or cleaning matrices