code: def set_to_cache(self):
          
          try:
              cache.set(self._get_cache_key(), {
                  'widget': self,
                  'url': self.get_url(),
              })
          except (PicklingError, AttributeError):
              msg = "You need to overwrite \"set_to_cache\" or ensure that %s is serialisable."
              raise NotImplementedError(msg % self.__class__.__name__)
docs: Add widget object to Django's cache.
  
          You may need to overwrite this method, to pickle all information
          that is required to serve your JSON response view.