@classmethod
    def cache_instance(cls, instance, new=False):
        pk = instance._get_pk_val()
        if pk is not None:
            cls.__dbclass__.__instance_cache__[pk] = instance
            if new:
                try:
                    # trigger the at_init hook only
                    # at first initialization
                    instance.at_init()
                except AttributeError:
                    pass
Return the number of instances that are set for the given server version.
dataset/ETHPy150Open evennia/evennia/evennia/utils/idmapper/models.py/SharedMemoryModel.cache_instance--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/api/servers/servers.py/get_num_instances