I just paid $110 for a mechanic to tell me my gas cap was loose!

I don’t think anyone has addressed one of your questions. It could take several days depending on your driving habits for the CEL to come back on even if the problem wasn’t corrected. The light wouldn’t likely come back on in a short test drive the mechanic would have done after tightening the gas cap. The ECU has to recognize the fault multiple times before turning on the CEL.

I’d also suggest buying a code reader for your own use. Just a cheap model will give you the code number and is all most car owners need. I think you can pick up a cheap model on ebay for under $50.