Is it good to eat more sugar after you get a cavity?

No. Eating more sugar and a diet high in sugar is more likely to make your teeth more susceptible to decay. More sugar intake after getting a cavity would certainly not be in your best interest either.