def register_data_obj(do):
    """
    save a new piece of data into the persistent cache
    :param do:
    :return:
    """
    from . import _x as x
    c = x.data_cache
    if do.generator_name not in c:
        c[do.generator_name] = {}
    if do.generator_hash not in c[do.generator_name]:
        c[do.generator_name][do.generator_hash] = {}
    if do.param_hash not in c[do.generator_name][do.generator_hash]:
        c[do.generator_name][do.generator_hash][do.param_hash] = {}
    if do.name not in c[do.generator_name][do.generator_hash][do.param_hash]:
        c[do.generator_name][do.generator_hash][do.param_hash][do.name] = do
    elif c[do.generator_name][do.generator_hash][do.param_hash][do.name] != do:
        if x.verbosity > 1:
            x.log('updating data in cache')
        c[do.generator_name][do.generator_hash][do.param_hash][do.name] = do
    x.data_cache = c
