Cantrips date all the way back to 1e, but you traded in a 1st level spell to memorize 4 cantrips, and they had virtually no effect in combat.
At-will magical attacks started officially with the Warlock's Eldritch Blast in 3.5, but 3e cantrips, though there were a few with non-trivial combat effects, were still 'prepared.'
4e gave effective at-will attacks to all classes, those that used Implements instead of weapons, including Eldritch Blast, corresponding to 5e attack cantrips. 4e wizards also got at-will minor utility spells that were actually called cantrips.
So, at-will attacks for all casters was a 4e innovation, but at-will utilities for all casters was a 5e thang.