Pattern Dynamics in Nonlinear Optical Cavities