A quick spray after almost every decent ride is a good plan.
Lubing the chain after a ride means the chain is warm, and has some time to make its way into the chain links.
Lubing it before a ride means the chain is cold, and doesn't have time for the lube to make its way in before being centrifugally thrown out.
Of course you don't feel like squatting down next to your bike when you're just back from a ride, but that is the best time to do it.
:smoking: