Alcohol will not kill the bacteria inside the cavity as it will never reach the depths of the cavity itself. It might only kill bacteria on the top-most portion which will not only be ineffective long-term, but you may also injure yourself.
If you have a cavity the best solution is goto your Dentist. I've had a cavity for quite a few months and got by without doing nothing, I did try over the counter Dental filler which worked but it's no good long term. It eventually caught up with me which I knew it would do and I went to the Dentist a week ago and now it has been cleaned and filled.