Cashner (2-2) scattered four hits and worked around three walks en route to the win, striking out four while tossing 98 pitches.
Dale Thayer completed the shutout with 1 2/3 scoreless relief frames for San Diego, which took the opener of a three-game series.
Jedd Gyorko socked a solo homer while Chase Headley went 2-for-4 with an RBI in the victory.
Marlins starter Wade LeBlanc (0-5) was saddled with the loss, yielding four runs (three earned) on four hits over five full innings.
Wisconsin business offering 'therapeutic cuddling' forced to close
Obama 'selfie' photographer speaks out: 'Photos can lie'