def get_cache_key(self, request: HttpRequest) -> Optional[str]:
        """
        If `scope` is not set during initialization, don't apply this throttle.

        Otherwise, generate the unique cache key by concatenating the user id
        with the `.throttle_scope` property of the view.
        """
        if request.user and request.user.is_authenticated:
            ident = request.user.pk
        else:
            ident = self.get_ident(request)

        return self.cache_format % {"scope": self.scope, "ident": ident}

        If `scope` is not set during initialization, don't apply this throttle.

        Otherwise, generate the unique cache key by concatenating the user id
        with the `.throttle_scope` property of the view.
        
ninja_extra/throttling/model.py