Implements cache setting to enable or disable class instance cache
Disables class instance cache to avoid test dependencies and to simplify writing tests