Metastable states regarding the network of chemical reactions involving flavylium compounds were investigated as well as the role they may play in models for optical memories capable of write-read-erase. A necessary requirement to achieve metastable states in flavylium systems is the existence of a high cis-trans isomerization barrier, as in 4′-hydroxyflavylium described through this paper. In an optical memory, the metastable state could be the signal to be detected upon the write step. In that case the autoerase is prevented by the metastable state. Conversely, the metastable state may be the initial state and prevents the auto and unwanted write step. The compound 4′-hydroxyflavylium offers the possibility of achieving both of these two situations, depending on the sequence of the pH stimuli prior to light absorption. In this work the pH dependent distribution of the flavylium species of the network in the presence of β-cyclodextrin was calculated. Improvement of the performance of the photochromic system in the presence of β-cyclodextrin was observed.