An optical medium having a cavity that defines a variable gap is provided. The optical medium is used in an optical sensor, laser, and variable frequency resonator, by way of example. The cavity is physically altered in response to changes in a measurable parameter like pressure, temperature, force, flow rate, and material composition. The optical medium is characterized in some embodiments by having a cavity disposed near or within a high Q optical resonator. The optical resonator can be formed by various structures of which Bragg reflector cavities, ring resonators, microdiscs, and microspheres are examples. The optical resonator is preferably coupled to a laser source. The altering of the cavity affects the resonance condition within the optical resonator and thereby the laser signal of the system. If the laser source is a mode locked laser, the repetition rate of the pulse train changes in response to changes in the measurable parameter. If the laser source is a CW source the frequency of the laser signal is dependent upon a measurable parameter.