Yes, cooking it in oil is very important as it increases its shelf life. If you are adding onion, garlic, ginger, etc, cooking it will add more taste and also ensures that nothing added to the paste is raw.