First, you must know that it is still better to wash your knives by hand more than in the dishwasher.
In a machine, frictions with other articles, chemical products, power of water jets, heat released by the device and ambient humidity can degrade the blade and its cutting edge.
That’s why wiping the blade on a cloth while you are cooking then handwashing your knife and wiping off the blade and the hande immediately and carefully after is the best way to preserve your knife.
Then, you have to adapt washing to the materials composing the blade and the handle of your knife.
Full stainless steel knives can be more easily washed in the dishwasher if you avoid hard programs and washing products. Although stainless steel has a good lifespan, it is still best to wash them in water with a sponge and mild soap to avoid rust spots and not scratch the blade.
Conversely, knives with wooden or horn handles, which are living and sensitive materials, must absolutely be banned from the dishwasher. However it is recommended to oil wooden handles, from time to time, in order to maintain wood, make it more resistant and give it a little shine. Prefer linseed oil, which is “lighter” than other oils.
Finally, for carbon steel blades, which are oxidizables, prolonged contact with water and acidic materials should be kept to a minimum. As most of food contains, it is best to simply wipe the blades on a cloth after use, without water and soap.