  The use of optical cavities to control chemical reactions has been of great
interest recently, following demonstrations of enhancement, suppression, and
negligible effects on chemical reaction rates depending on the specific
reaction and cavity frequency. In this work, we study the reaction rate inside
imperfect cavities, where we introduce a broadening parameter in the spectral
density to mimic Fabry-P\'erot cavities. We investigate cavity modifications to
reaction rates using non-Markovian Langevin dynamics with frictional and random
forces to account for the presence of imperfect optical cavities. We
demonstrate that in the regime of weak solvent and cavity friction, the cavity
can enhance chemical reaction rates. On the other hand, in the high friction
regime, cavities can suppress chemical reactions. Furthermore, we find that the
broadening of the cavity spectral density gives rise to blue shifts of the
resonance conditions and, surprisingly, increases the sharpness of the
resonance effect.
