def invalidate_objects(self, objects, is_new_instance=False, model_cls=None):
        obj_keys = [k for o in objects for k in o._cache_keys()]
        flush_keys = [k for o in objects for k in o._flush_keys()]
        # If whole-model invalidation on create is enabled, include this model's
        # key in the list to be invalidated. Note that the key itself won't
        # contain anything in the cache, but its corresponding flush key will.
        if (config.CACHE_INVALIDATE_ON_CREATE == config.WHOLE_MODEL and
           is_new_instance and model_cls and hasattr(model_cls, 'model_flush_key')):
            flush_keys.append(model_cls.model_flush_key())
        if not obj_keys or not flush_keys:
            return
        obj_keys, flush_keys = self.expand_flush_lists(obj_keys, flush_keys)
        if obj_keys:
            log.debug('deleting object keys: %s' % obj_keys)
            cache.delete_many(obj_keys)
        if flush_keys:
            log.debug('clearing flush lists: %s' % flush_keys)
            self.clear_flush_lists(flush_keys)
Invalidate all the flush lists for the given ``objects``.
dataset/ETHPy150Open django-cache-machine/django-cache-machine/caching/invalidation.py/Invalidator.invalidate_objects