Green’s Dictionary of Slang

cap n.5

[cap v.5 ]
(orig. US black)

1. [1940s+] a rejoinder.

2. [1960s] an insult aimed at someone’s family; used as part of a ritualized interchange.