With cassette, of course, this would all be done to the cassette body on the hub, after you take the cassette off. Do remember to grease the hub bearings while you are at it, but gears get oil, bearings get grease, or so I was told. The reason is because the freewheel or cassette freewheel in only one direction, governed by pawls, and you don't want those pawl springs getting all gummed up.