When the cashier is rude to me I am rude right back and try to get out of the store as soon as my purchase is over. I know I should not be rude, but sometimes I just can't help it.
I am yet to encounter one but I would not wish for it. basically what I would do in my case is avoid interacting with the cashier again in future. I would always rather be served with another cashier rather than a person who is rude to me.
How about grocery store owners start providing chairs for cashiers to sit while waiting for customers. With all the attitude, how about cashiers stop being cowardly sooks and take out their anger on managers rather than customers?