def __cache_get_and_replace()

in pyignite/api/key_value.py [0:0]


def __cache_get_and_replace(connection, cache_info, key, key_hint, value, value_hint):
    query_struct = Query(
        OP_CACHE_GET_AND_REPLACE, [
            ('cache_info', CacheInfo),
            ('key', key_hint or AnyDataObject),
            ('value', value_hint or AnyDataObject),
        ]
    )
    return query_perform(
        query_struct, connection,
        query_params={
            'cache_info': cache_info,
            'key': key,
            'value': value,
        },
        response_config=[
            ('value', AnyDataObject),
        ],
        post_process_fun=__post_process_value_by_key('value')
    )