The cap height is the height of a capital Letter*, which is not necessarily identical to the ascender length.
The cap height is measured from the baseline, in relation to the x-Height.
* more exactly a «flat» capital letter such as H or X.