The cap is to prevent spilling and to stop rapid water absorbtion. Brake fluid is hydoscopic so in naturally absorbs water. This is why you need to change it at regular intervals, because the absorbed water will boil in and around the caliper area and this leads to reduced braking performance.
You will be fine if its just been left overnight