I learned a lesson about stashing "goodies". I had cheese in my stash, so added dry ice. Decided to put one bottle of beer for a treat. When I got to the cache, the dry ice had frozen the beer, which expanded and leaked sticky beer all over my food! Needless to say, I not only had no beer, I had a big mess to clean up and a stale beer smell for the following week.
Many trailheads in California have bear boxes. Although not 100% legal, I have stashed food. I have been careful to make this as small as possible. You must label it and have a return date, or it will be taken by rangers. It is intended for people who park cars and go on a backpack. No food or "smelly stuff" can be left in cars. Some people leave huge coolers of food, so I am not too bothered by taking space with my tiny stash. Bear boxes become very hot so I use dry ice to keep things cool. Anything in direct contact with the dry ice will freeze.
If you use a GPS, get coordinates in addition to a written description, if you stash the food out of sight.
Heat is a real problem. Cheese or chocolate, can become a melted mess. Foods that are not fully dried can become moldy. A black bear can acts like an oven when hit by direct sunlight.