You're grey and/or black tank valve seals maybe be bad allowing any residual liquid in the tank to fill between the valves and the cap. As the weather has gotten hotter the contents in the pipe may have become pressurized due to the warmer temperatures. The seals may have worked enough to hold the contents in the pipe keeping them from seeping back into the tanks. The pressure gave the contents a little extra help coming out when the cap was removed. Organic break down of the contents in the pipe may also have produced gas adding to the pressure in the pipe.
Either way it was like popping the cap off a champagne bottle or a soda bottle when you took the cap off. You might replace the 3" cap with one that has a garden hose cap. That way in the future you could loosen the garden hose cap first cap to see if it starts dripping before you remove the 3" cap itself.