1. Set a 5- to 6-quart pan or 14-inch wok over medium-high heat. Add oil, mustard seed, and cumin seed.
2. When the seeds begin to pop, in 2 to 3 minutes, stir in the onion, chilies, turmeric, and curry leaves. Stir often until the onion is limp, about 4 minutes.
3. Reduce heat to low. Add rice, peas, 1/2 teaspoon salt, and sugar. Stir until rice is evenly colored yellow. Sprinkle with lime juice and mix well. Cover and stir occasionally until rice is hot, 6 to 10 minutes. Add salt to taste. Transfer to a platter.
4. Sprinkle rice mixture with cashews and cilantro. Serve hot, warm, or at room temperature.