According to the USDA Food Inspection Service, canned foods are safe indefinitely as long as they are not exposed to freezing temperatures, or temperatures above 90 °F (32.2° C). If the cans look ok, they are safe to use. Discard cans that are dented, rusted, or swollen. High-acid canned foods (tomatoes, fruits) will keep their best quality for 12 to 18 months; low-acid canned foods (meats, vegetables) for 2 to 5 years. Mushrooms are a low-acid food. The “use by” date means that the food is at its peak quality up until this date and then it will start to decline.