Two wrongs don't make a right.
That being said I have personal experience of being lied to and forced to choose between forgiving them or ending the relationship and the fact that they didn't face any consequences was the worst part. Not because I was spiteful but because I didn't want them to hurt me again, I wanted them to learn their lesson and actually change, not just say they've changed. Because I didn't want to leave them.
So I think if you hurt someone, and they hurt you in revenge, then you should forgive them or at very least not hurt them again, because if two wrongs don't make a right then three sure as hell don't either.
And if you hurt someone and you want them to forgive you, perform some kind of penance to show them you're serious, don't just expect them to forgive you, earn the right to be forgiven. Or are they not worth it?