According to Greens Dictionary of Slang, to the cap is proven as slang meaning "to exceed" in the 1940s, linked to the ritualized insults of capping (1960s). These phrases appear to derive from the cap definition as "top" or "upper limit."