You could use the result from your caster level check to cast the spell and apply it to spell resistance as well. Same with the attack roll, if you wanted. It would just be a "spell competence check" which has to beat spell DC, target's AC and spell resistance. The drawback is that it would devaluate SR a bit and higher level spells would tend to either fumble or hit (but not "be cast successfully and then miss").

A minor point: You might want some rules to limit cantrip spamming. A 30 cantrips per hour limit or something.