The other day — amid record heat — my refrigerator stopped working. An expensive visit from a technician revealed that the appliance’s compressor had conked out and that it was more ­cost-efficient to buy a new model than replace the failed part — a huge inconvenience and an added cost I had not expected to incur. I took the opportunity to figure out what caused the breakdown, what I could do to prevent it from happening again, and how I could put my appliance to best use.

Jeff Sweet, corporate manager of product marketing at ­Sub-Zero — a top-of-the-line refrigeration company — informed me of my first great mistake: I had never cleaned the dust and dirt from my machine’s condenser coils. Dust and dirt obstruct the air transfer and make your appliance’s motor work less ­efficiently.

The condenser coils are often found in the back, so you need to pull the machine out from the wall to access them. For some models, such as built-in ­Sub-Zero fridges, the components are at the top of the appliance’s grill or in the toe-kick at the bottom of the machine. Before cleaning the condenser, switch off the appliance. Then, with a soft-bristle brush attachment, vacuum in the same direction as the condenser’s veins. Sweet suggests doing this every three to six months, but he cautions “that can vary if you have animals and especially if you have a model with the condenser near the floor; those tend be more magnetic to pet hair so you want to make sure that you clean it on a more regular basis.” Other warning signs that your condenser needs cleaning: frost, condensation or ice buildup inside of your unit.

Abnormal heat probably posed issues for my refrigerator as well. When it’s hotter than normal outside (as it is in my kitchen without air conditioning) the motor runs more. According to KitchenAid’s manual, at normal room temperatures, the motor runs about 40 to 80 percent of the time; under warmer conditions, it will run even more. Setting your appliance at the right temperature will help keep the motor in check: Your fridge should be set between 37 and 40 degrees and your freezer at 0 degrees.

Daily care of your fridge will also help it work more efficiently; don’t overstuff it. You need room to let cool air circulate and keep food at a safe temperature. Conversely, don’t leave your fridge empty. Refrigerators need to have some items inside to maintain low temperatures and absorb the warm air that enters when you open the door.

There is also a method to properly stocking your refrigerator; storing items in the correct drawer or on the right shelf will ensure food stays fresher longer.

The top shelf is not the coldest spot, so avoid putting items here that spoil easily. This is a good place for soda, beer and pasteurized fruit juice. (Store freshly squeezed juice on the bottom shelf where it’s cooler.)

The temperature is the most consistent on the middle shelf, so it’s the perfect place to keep eggs. Ditch the plastic egg tray that comes with some refrigerators and keep the eggs in their original container; it protects them from picking up odors from any smelly items in the fridge.

Keep milk and other dairy products such as yogurt, sour cream and cottage cheese on the bottom shelf toward the back where the fridge is the coldest. Also, store raw meat in its original packaging on the bottom shelf — it will keep best here and if juices drip, they won’t get all over the entire fridge. If you don’t have a meat drawer, which is slightly colder than the rest of the fridge, keep deli meats on the bottom shelf as well.

Store items high in vinegar, salt and sugar in the door. Examples include: ketchup, jams and jellies, salad dressing, pickles, mustard, mayonnaise, salsa, barbecue sauce and marinades. Olive and vegetable oils should be stored in your pantry, but keep nut oils, such as sesame or walnut oils, in the door, too.

Butter and soft cheeses don’t need to be kept super cold, so they can be stored in the dairy compartment on the door, which tends to be the warmest part of the fridge.

Keep items that tend to wilt in the drawer that is labeled “high humidity.” This will keep vegetables such as lettuce, carrots, cucumbers, broccoli and beans fresher longer. This is also the best place to keep berries.

Keep most fruit — or anything that tends to rot — in the low-humidity drawer (sometimes labeled “crisper”). Items including apples, pears, bananas, melons, avocados and other stone fruits emit ethylene, a gas that can cause other fruits and vegetables to spoil. And don’t wash fruit before refrigerating it. The dampness can make it mold and rot more quickly.

Mayhew, a “Today” show style expert and former magazine editor, is the author of “Flip! for Decorating.”

More from Lifestyle: