use cache by reference in [<ReferenceEquality>] algebraic types