you could only be describing the evap solenoid. and its line runs back to the gas tank. not the brakes. that cap sounds like the ac lines to me.

and how do you think a small vac leak is causing misfires?