Soak rice in warm water for 30 minutes and strain the water
Add oil to the pan. When the oil is hot, add onions and saute till the onions turn translucent. Add a pinch of salt and sugar; cook till the onions are caramelized (Sugar is optional, with little more oil this can still be achieved, but I like little sugar in all dish to neutralize flavour and yes I can hear your question, its not sweet). Keep aside
Add ghee to the same pan. When the ghee is hot, add whole spices and cook for 30 seconds. Add cashew, and when they turn golden brown, add ginger garlic paste and green chilli. Cook till the raw smell goes
Add mint and cook for 2-3 minutes. Add the rice and cook for a minute
Add required salt and transfer the mixture to rice cooker and add 1:2 water and cook. Add the caramelized onions and mix well. Serve Mint Rice with gravy/raita