To cagg; a military term used by the private soldiers, signifying a solemn vow or resolution not to get drunk for a certain time; or, as the term is, till their cagg is out: which vow is commonly observed with the strictest exactness. Ex. I have cagg’d myself for six months. Excuse me this time, and I will cagg myself for a year. This term is also used in the same sense among the common people of Scotland, where it is performed with divers ceremonies.
Definition taken from The 1811 Dictionary of the Vulgar Tongue, originally by Francis Grose.
Caffan * CagNathan Bailey's 1736 Dictionary of canting and thieving slang
John S. Farmer's collection of canting songs and slang rhymes