Polymer-based microcavity with photoencoded quadratic nonlinearity.