I ride in a lot of crap and a lot of crap weather, so there is lots to get rid of after a ride.
(especially in spring when even the good roads have paved shoulders caked in winter debris, sand and salt)
OUTDOORS
- I spray wash it with a can of WD40 and let it sit (forget all the naysayers)
- then I spray wash it with water at low pressure (forget all the naysayers)
- Then I spray it down with WD40 to disperse the water
- Then I wipe it down and ride it 200 more miles
- Then I do it all again.
I replace my chain every 3 years just in case.
INDOORS:
If I am in a hotel or something, I just spray down a cloth with wd40 and wipe it down (including the chain)
If I am somewhere indoors and more ambitious, take the chain off and into a bowl to soak
For the derailers, I hold a rag under them and spray them down with wd40
I don't use chain lube (just residual wd40)
but chain lube is probably a good idea.