The ornamental design for a cap for a liquidcontainer, as shown and described.
FIG. 1 is a top view in perspective of a cap for a liquid container showing my new design;
FIG. 2 is a front view thereof;
FIG. 3 is a rear view thereof;
FIG. 4 is a top view thereof;
FIG. 5 is a bottom view thereof;
FIG. 6 is a first side view thereof; and,
FIG. 7 is a second side view thereof.
The dashed lines shown in the drawings illustrate portions of the cap that are not claimed and form no part of the claimed design. The dash-dot lines represent the boundary of the claimed design.