For the sauce, combine all the sauce ingredients in a blender and blend for 1 minute. Let the mixture rest in the blender for 5 minutes, then blend again until smooth. (Resting, then blending again helps break down the whole spices.)
Preheat the Instant Pot by selecting the Sauté setting. Heat the oil in the preheated pot for a few seconds, then add the tofu and cook for 2 minutes to sear some edges. Add the blended sauce to the pot, rinse out the blender with the water, and then add the water to the pot. Stir well and cook until just hot and bubbling. Select the Cancel setting. Stir again to pick up any stuck bits.
Lock the lid into place, set the Pressure Release Knob to Sealing, select the Pressure Cook/Manual setting at high pressure, and set the cook time to 17 minutes.
Once the cooking cycle is done, let the pressure release naturally. Open the lid, taste for seasoning, adjusting if needed. Add the cashew cream, if using.
Garnish with the cilantro and red pepper flakes.