Winter squash are generally long-keeping, and those with thicker skins keep even longer! I've still got last years winter squash stored in my pantry!
Some I grow that keep a few months (1-3): boston, thelma sanders,
And some that keep 6 months: queensland blue, musquee de provence (possibly longer- I've always eaten them by this point)
Similar for cukes, ones with thicker skins last longer (though weeks not months!)
There is a type of storage tomato that keeps for 1-2 months, 'colgar'- and it really does keep!
In my experience, tomatoes harvested green but mature at the end of the season can keep until Thanksgiving or even Christmas. They are a bit fussy because they need to be kept in a single layer on paper and checked frequently (daily is best). Some will fail and rot but most will ripen slowly. The flavor isn't as good as vine-ripened, but certainly as good as most store tomatoes.
Another variable that I think needs to be considered aside from variety of produce being grown is how it is grown. Nutrient dense produce grown in living or thriving soils, abundant in a full complement of minerals and teeming with soil bacteria and fungal life will grow produce that will store longer. In my old garden at my last house, I was just approaching this state of soil health in my garden when I bought a small farm and moved. My shelf life record was fall grown spinach that lasted for three months in my fridge. Harvested in November, it was the end of January when the remaining spinach started to show browning on the leaf edges.
"Study books and observe nature; if they do not agree, throw away the books." ~ William A. Albrecht
I find that interesting. I have always found that the better quality produce doesn't last as long as nutrient-deficient produce, in terms of their attractiveness to insects and moulds.
But I suppose, like how with eggs from chickens with a superior diet and health whose yolks remain nearly spherical on a flat pan, that nutrient density and the availability of all necessary nutrients and minerals would lead to plants with optimal cell structure and longevity; they're build out of the best stuff by something eating the best stuff and living the best life it can, speaking of the soil as a collective whole organism, or a compound of organisms like lichen, as analogous to a chicken laying eggs.
A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.
-Robert A. Heinlein
The shelf life and eating quality of fruits and vegetables depends greatly on proper storage. Many comprehensive gardening or cooking books will explain the best storage methods for each sort of fruit and vegetable. For example, storage temperature really makes a difference. Many leafy vegetables and root vegetables (carrots, turnips, beets) store best in a cold environment like a refrigerator, but potatoes and sweet potatoes do better in a dark, room-temperature storage. (potatoes also keep better if some dirt is left on). Tomatoes and peaches get mealy in the refrigerator. Leafy vegetables and herbs keep best in a jar or cup of water, like a flower bouquet, and loosely covered to keep the leaves from drying out.
For pretty much all produce, it should be stored whole and dry, so better to wash it when you are going to use it rather than when putting it away (or else dry thoroughly). It also should not be crowded or crushed, and damaged items should be used right away because they will not keep.
For homegrown produce, there are often steps that should be taken immediately post-harvest to "cure" the produce for long storage. Sometimes it is as simple as waiting for the outer layer to dry and harden, like with onions and garlic, and sometimes more complicated process of curing at different temperatures, like for pears. Properly cured and stored, most root vegetables will keep for months. Varieties marketed as "storage" keep longer.
root crops store well and also winter squash, butternut, acorn ect.and things that can be dried, peas, corn, mushrooms ect store well ive found that cauliflower lasts lot longer than broccoli, watery stuff like celery , rhubarb, spinach, lettuce, ect don't last as long as other things in the fridge.
If are fortunate enough to have a freeze dryer, it is a great way to preserve vegetables and other food items as well. For example my wife likes to add kale to some/many of her soups and when we do not have fresh garden kale we have the freeze dried version and it keeps almost indefinitely. The other day she was low and ask me to pick up some bagged kale at the grocery store. I got lucky as I picked up a couple bags and then went past a produce employee marking down some produce. When I asked what she had, i discovered that she was marking down four bags of organic kale from $4 to $1.50. This was because that was the last day they could sell it. I bought three bags and went home and fired up the freeze drier. The first batch was done Wednesday and the second batch finished today and now we are drying a batch of raw milk.
It is not an inexpensive appliance, although the price has come down significantly from what we paid four years ago. However, it is a great way to keep from food from rotting and we just love freeze dried apples, peaches, peppers and many others. The aformentioned list are all great healthy snacks and even green peppers taste great as a snack once all the water is removed, especially if they are organically grown in your garden. We even freeze dried ice cream sandwiches just to prove that we could do it.
I don't like that guy. The tiny ad agrees with me.