A plasmonic cavity filled with active material is proposed to explain optical switching. Optical properties, including transmission, response time, and field distribution of on/off state, are numerically investigated. We demonstrate that such a gain-