  Dynamic tuning of optical cavities is highly desired in many photonic
systems. Here, we show that Fabry-P\'{e}rot(FP) cavities can be actively
controlled by the Casimir force. The optical FP cavities consist of a gold
nanoplate confronted to an electrical-connecting multi-layer substrate in a
liquid environment. The gold nanoplate can be stably suspended due to the
balance of repulsive and attractive Casimir forces. Moreover, the suspension
distance are modulated strongly by the electric gating or temperature of the
system. As a result, we could shift the resonant wavelengthes of the cavities
with tens of nanometers at optical frequencies. Finally, we analyze the
influence of Brownian motion on the equilibrium distances. Due to the high
Q-factor of the FP cavities, our proposed system offers a remarkable platform
to experimentally investigate the thermal Casimir effect at sub-micrometer
separations
