Manipulating cavity photon dynamics by topologically curved space | Synapse