fix cache testing and enum wrapper