The ornamental design for a cap with locks of hair, as shown and described.
FIG. 1 is a front, left perspective view of a cap with locks of hair on a partial human figure;
FIG. 2 is a rear perspective view thereof;
FIG. 3 is a front orthographic view thereof;
FIG. 4 is a right-side orthographic view thereof;
FIG. 5 is a rear orthographic thereof;
FIG. 6 is a top view thereof; and,
FIG. 7 is a bottom view thereof.
The broken-line outline of the partial human figure assists in illustrating how the claimed design may appear when worn, but forms no part of the claimed design.