code: def get_cache_key(datatable_class, view=None, user=None, **kwargs):
      
  
      datatable_name = datatable_class.__name__
      if datatable_name.endswith('_Synthesized'):
          datatable_name = datatable_name[:-12]
      datatable_id = '%s.%s' % (datatable_class.__module__, datatable_name)
      if CACHE_KEY_HASH:
          datatable_id = _hash_key_component(datatable_id)
  
      cache_key = 'datatable_%s' % (datatable_id,)
  
      if view:
          if not inspect.isclass(view):
              # Reduce view to its class
              view = view.__class__
  
          view_id = '%s.%s' % (view.__module__, view.__name__)
          if CACHE_KEY_HASH:
              view_id = _hash_key_component(view_id)
          cache_key += '__view_%s' % (view_id,)
  
      if user and user.is_authenticated():
          cache_key += '__user_%s' % (user.pk,)
  
      # All other kwargs are used directly to create a hashed suffix
      # Order the kwargs by key name, then convert them to their repr() values.
      items = sorted(kwargs.items(), key=lambda item: item[0])
      values = []
      for k, v in items:
          values.append('%r:%r' % (k, v))
  
      if values:
          kwargs_id = '__'.join(values)
          kwargs_id = _hash_key_component(kwargs_id)
          cache_key += '__kwargs_%s' % (kwargs_id,)
  
      log.debug("Cache key derived for %r: %r (from kwargs %r)", datatable_class, cache_key, values)
  
      return cache_key
docs: Returns a cache key unique to the current table, and (if available) the request user.
  
      The ``view`` argument should be the class reference itself, since it is easily obtainable
      in contexts where the instance is not available.