One of the shortcomings of home insurance is that it does not replace spoiled food after a covered event. For the insurance company, taking steps to protect your food is the responsibility of the homeowner, and the losses are excluded from coverage. From another perspective, the insurance company has no way of knowing how long you have had the food in storage or even if it is worth salvaging to being with.
The best advice is to be prepared. Keep one or more coolers on hand and if the power is out for an extended period, transfer your perishables to a safer environment. For short-term power outages, avoid opening the refrigerator or freezer any more than is absolutely necessary. Keeping the units sealed will hold in the cold longer and prevent premature spoilage. Having a backup generator is the best choice, but coolers filled with ice will suffice in a pinch.
The insurance company will not take responsibility for anything related directly to a power failure. since there is no way to accurately predict when an outage will happen, or how long it will last, insurance companies would have to charge drastically higher rates in order to insure their many policyholders against such a large unknown factor.
If your food spoiled as a direct result of a covered peril, such as a tree falling on your kitchen and destroying your refrigerator, you may be able to get a claim for spoiled food approved. Doing so would be a rare event on the part of the insurer, but it is not impossible to consider that losing your entire refrigerator suddenly made it impossible to protect its contents. What is more likely to happen is that you will be allowed to claim a small portion of the food cost as a loss of use claim, meaning that you could be partially reimbursed for the food, but would not receive full payment for the entire contents.