The ornamental design for an attachment for a cap, as shown and described.
FIG. 1 is a front elevational view of an attachment for a cap showing my
new design, the rear does not form part of the claimed design; and,
FIG. 2 is a front elevational view of a second embodiment of an attachment
for a cap showing my new design; the rear does not form part of the
claimed design.