Preheat oven to 350; spray two 8" cake pans or a 9" x 13" baking pan with oil, and flour with rice flour or line with parchment. Sift flour, sugar, cocoa, baking powder, baking soda, and salt into the bowl of electric stand mixer fitted with whip attachment.In a separate bowl, whisk together buttermilk, oil, eggs, and vanilla. With mixer on low speed, slowly add wet ingredients into the dry. With mixer still on low, slowly add the coffee, then mix at medium high speed for 1 minute, until batter is light and smooth.
Pour batter into prepared pans and smooth with a spatula. Bake for 30-35 minutes (for cupcakes, check for doneness after 15 minutes), or until the center feels solid to the touch and an inserted toothpick comes out clean from the middle of the cake.Be sure that there is no wetness in the center before you remove the cake from the oven, or it will fall and be gooey.Remove from oven and cool in pan for 30 minutes, then turn onto a cooling rack to cool completely.To frost layers, place one layer flat side up on a flat plate, and spread top with frosting or ganache. Place second layer rounded side up on top, and spread frosting evenly over tope and sides of cake.