This brings it back to spoiling food. The problem with it is that no matter how you implement it, the mechanic would promote long rest more frequently and discourage continuing the adventuring day. This is the opposite of what many of us are looking for.

If food starts spoiling as soon as you enter an area, you are then encouraged to only go through each individual area, one area at a time, and then rest after that specific area. Why? Because you wouldn't want to enter another area and thus trigger the spoiling of food that you may really need later. So, you are encouraged to rest a lot more than you would if you knew that food didn't spoil.

Or, if food starts to spoil as soon as you find it, then you are encouraged to long rest as soon as you find just enough food to long rest. After all, why waste food? If you find more than you need to long rest, it'll just spoil.

Regardless, spoiling food is in no way a meaningful and strategic resting mechanic feature. It would only defeat the entire point of managing food to limit resting. It would only encourage long rest more and discourage continuing each day as long as you can possibly stretch your party within reason.