A healthy immune response to a bacterial infection includes "memory" to permit the body to thwart subsequent exposure to same bacteria.  What are the dynamics of using antibiotics on initial exposure to the bacteria regarding a possible degradation of the quality of this "memory" and thus the body's possibly compromised ability to fight a repeat exposure to same bacteria ?

I am not speaking of vaccines ... focus here is on bacteria