Cache states for quick lookup, and simple state/plugin assignments.