in pyignite/client.py [0:0]
def _get_affinity_key(self, cache_id, key, key_hint=None):
if key_hint is None:
key_hint = AnyDataObject.map_python_type(key)
cache_partition_mapping = self._cache_partition_mapping(cache_id)
if cache_partition_mapping and cache_partition_mapping.get('is_applicable'):
config = cache_partition_mapping.get('cache_config')
if config:
affinity_key_id = config.get(key_hint.type_id)
if affinity_key_id and isinstance(key, GenericObjectMeta):
return get_field_by_id(key, affinity_key_id)
return key, key_hint