what most likely happened was you slightly overfilled your gastank (even though you didnt mean to), and after capping the tank the pressure of the vapors vented off the tank was much higher than normal and that exploited a leak in an old dry hose. there is a chance that if you just clear the code it will not reappear, replacing the cap is ok but it sounds like the cap is working fine. if it does become a reoccuring problem, then inspect the rubber hoses in the evap system near the charcoal cannister and near the tank if applicable. replace as needed.
1996 SSEi, tan leather, gold wheels...