I took it because I had surgery. I had to take it for over a week. If you need it, I don't think it's a bad idea. I think for me, it was worse because I was on different antibiotics a few times in a short period of time. Maybe it will help you, I don't know.
it says this on drugs.com:
Before using Keflex, tell your doctor if you are allergic to any drugs (especially penicillins), or if you have:
If you have any of these conditions, you may need a dose adjustment or special tests to safely take Keflex.