Most of the time cavities are due to a diet high in sugary foods and a lack of brushing. Limiting sugar intake and brushing regularly, of course, can help. The longer it takes your child to chew their foods the longer the residue stays on their teeth, the greater the chances of getting cavities.