docs: def _gen_cache_key_for_slice(url_dict, start_int, total_int, authn_subj_list):
      """Generate cache key for the REST URL the client is currently accessing or is
      expected to access in order to get the slice starting at the given ``start_int`` of
      a multi-slice result set.
  
      When used for finding the key to check in the current call, ``start_int`` is
      0, or the start that was passed in the current call.
  
      When used for finding the key to set for the anticipated call, ``start_int`` is
      current ``start_int`` + ``count_int``, the number of objects the current call will
      return.
  
      The URL for the slice is the same as for the current slice, except that the
      `start` query parameter has been increased by the number of items returned in
      the current slice.
  
      Except for advancing the start value and potentially adjusting the desired
      slice size, it doesn't make sense for the client to change the REST URL during
      slicing, but such queries are supported. They will, however, trigger
      potentially expensive database queries to find the current slice position.
  
      To support adjustments in desired slice size during slicing, the count is not
      used when generating the key.
  
      The active subjects are used in the key in order to prevent potential security
      issues if authenticated subjects change during slicing.
  
      The url_dict is normalized by encoding it to a JSON string with sorted keys. A
      hash of the JSON is used for better distribution in a hash map and to avoid
      the 256 bytes limit on keys in some caches.
  
      """
      # logging.debug('Gen key. result_record_count={}'.format(result_record_count))
      key_url_dict = copy.deepcopy(url_dict)
      key_url_dict['query'].pop('start', None)
      key_url_dict['query'].pop('count', None)
      key_json = d1_common.util.serialize_to_normalized_compact_json(
          {
              'url_dict': key_url_dict,
              'start': start_int,
              'total': total_int,
              'subject': authn_subj_list,
          }
      )
      logging.debug('key_json={}'.format(key_json))
      return hashlib.sha256(key_json.encode('utf-8')).hexdigest()