If you are cooking rice to make this, cook the rice with some salt and a teaspoon of oil. The rice should be cooked soft (not al dente) but not mushy. Sprinkle a teaspoon of sugar on the hot rice and fluff it out. Let it cool.
Put the grated coconut in a wok, and over medium heat, toast it till it is golden brown and gives of a nice aroma. Remove from the wok and keep aside to cool.
Heat the coconut oil in the same wok and add the halved cashewnuts. Turn down the heat to medium. Fry till they start turning golden brown. Remove the cashewnuts and add to the toasted coconut. To the remaining oil, add the mustard seeds. When they splutter, add both the lentils and stir until they turn golden brown. Break the dried red chillies into 2 or 3 pieces. Add them to the wok with the asafoetida powder and curry leaves. Stir a couple of times and take the wok off the heat.
Add the rice, the toasted coconut, the cashewnuts and a little more salt, if needed, to the wok. Gently mix everything together without the rice becoming mushy.
Serve slightly warm with sambhar, yogurt and papads.