Change the constCache type to an array.

This change allow to use several classes inheriting from BaseEnum.
With the old behavior, all the method calls returned the same results even from different classes.