Most inverters won't have enough juice to run the frig, just the lights and fans.
I use the old hurricane method. I always keep two plastic one gallon jugs in the freezer (frozen always), If the power goes out for more than a few minutes, I put one jug down below in the frig to keep things cool, and it always lasts until the power comes back on. Then just put it back up above to refreeze. Never have lost any food to spoilage this way, and it's usually good enough for at least 24 hours if need be.