you shouldn't leave cake batter out at room temperature for any longer than an hour. cake batter that contains ingredients that spoil quickly, such as eggs, milk, or buttermilk, will be at risk of going bad. if you are to store your batter for a while, make sure to store it covered in the refrigerator.