Green’s Dictionary of Slang

cag v.

also keg
[dial.]

1. to irritate, to annoy.

[UK]in Southey Letters 1 (1856) 149: Pray do not cag Horne Took [sic] for the sake of the debates [EDD].
[UK]Hotten Sl. Dict.
[UK]Sl. Dict.

2. mid-19C to abtain from alcohol.

[Ind]Bombay Gaz. 3 Aug. 4/2: Many of them had adopted a disgraceful custom, well known in some regiments by the slangnlame of cagging [...] ‘Cag’ we believe to imply [...] an abstinence for a limited and fixed period, from the use of ardent spirits.

In derivatives

cagged (adj.) (also kegged)

irritated, angry.

[UK]Lex. Balatronicum n.p.: Cag. To be cagged. To be sulky or out of humour.
[UK]‘Bill Truck’ Man o’ War’s Man (1843) 247: Oho! – kegg’d – kegg’d already [...] I’d no idea I’d strike fire out of the old flint so smartly.
[UK]W.T. Moncrieff Heart of London II i: I declare he’s not like the same man. [...] cagged about my putting the rogues in spirits.