If its last 5 min like that leave it in the oven the heat present will bake the cake.
Leave it in the oven..bake again once you have electricity. Cake might sink but taste should be good..
If power has gone for 2-3mins then no probs if more then cake will get spoiled. Dont worry u can save ur cake take abig kadai with alid in which ur baking vessel can fit in. Now switch on gas n pour water in kadai flame should be high when water start boiling keep one steel stand above this keep ur baking dish n cover now cook this in medium high flame n check ur vake in between. By doing this u can save ur cake bcoz it has happened with me many times
You can take a big vessel heat it on low flame and place a stand(esp used to keep hot vessel in place) pre heat vessel to give pre heated oven effect place your cake tin filled with batter keep it on stand & cover with tight fitting lid no need to add water also open and check after 20-25 mins