def write_file_list_cache(opts, data, list_cache, w_lock):
    serial = salt.payload.Serial(opts)
    with salt.utils.fopen(list_cache, 'w+b') as fp_:
        fp_.write(serial.dumps(data))
        _unlock_cache(w_lock)
        log.trace('Lockfile {0} removed'.format(w_lock))
Checks the cache file to see if there is a new enough file list cache, and
dataset/ETHPy150Open saltstack/salt/salt/fileserver/__init__.py/write_file_list_cache