code: def get_widget_or_404(self):
          
          field_id = self.kwargs.get('field_id', self.request.GET.get('field_id', None))
          if not field_id:
              raise Http404('No "field_id" provided.')
          try:
              key = signing.loads(field_id)
          except BadSignature:
              raise Http404('Invalid "field_id".')
          else:
              cache_key = '%s%s' % (settings.SELECT2_CACHE_PREFIX, key)
              widget_dict = cache.get(cache_key)
              if widget_dict is None:
                  raise Http404('field_id not found')
              if widget_dict.pop('url') != self.request.path:
                  raise Http404('field_id was issued for the view.')
          qs, qs.query = widget_dict.pop('queryset')
          self.queryset = qs.all()
          widget_dict['queryset'] = self.queryset
          widget_cls = widget_dict.pop('cls')
          return widget_cls(**widget_dict)
docs: Get and return widget from cache.
  
          Raises:
              Http404: If if the widget can not be found or no id is provided.
  
          Returns:
              ModelSelect2Mixin: Widget from cache.