I am sorry you're troubled by this incident.
I tend to approach these things with caution because I know both sides. I used to work in retail. I hated it. It turned me into a bitter, angry, unhappy person. I also understand that the customers don't like being treated poorly. I get it.
I think you should look at it this way: miserable cashiers tend to show their unhappiness, but you don't need to internalize that. The cashier probably hates her job. Her behavior is more of a reflection of her frustration and annoyance than anything you deserve. Just remember this.