Cavity-modified molecular dipole switching dynamics | Synapse