def write_mount_cache(real_name,
                      device,
                      mkmnt,
                      fstype,
                      mount_opts):
    '''
    .. versionadded:: 2018.3.0

    Provide information if the path is mounted

    :param real_name:     The real name of the mount point where the device is mounted.
    :param device:        The device that is being mounted.
    :param mkmnt:         Whether or not the mount point should be created.
    :param fstype:        The file system that is used.
    :param mount_opts:    Additional options used when mounting the device.
    :return:              Boolean if message was sent successfully.

    CLI Example:

    .. code-block:: bash

        salt '*' mount.write_mount_cache /mnt/share /dev/sda1 False ext4 defaults,nosuid
    '''
    cache = salt.utils.mount.read_cache(__opts__)

    if not cache:
        cache = {}
        cache['mounts'] = {}
    else:
        if 'mounts' not in cache:
            cache['mounts'] = {}

    cache['mounts'][real_name] = {'device': device,
                                  'fstype': fstype,
                                  'mkmnt': mkmnt,
                                  'opts': mount_opts}

    cache_write = salt.utils.mount.write_cache(cache, __opts__)
    if cache_write:
        return True
    else:
        raise CommandExecutionError('Unable to write mount cache.')
.. versionadded:: 2018.3.0

    Provide information if the path is mounted

    :param real_name:     The real name of the mount point where the device is mounted.
    :param device:        The device that is being mounted.
    :param mkmnt:         Whether or not the mount point should be created.
    :param fstype:        The file system that is used.
    :param mount_opts:    Additional options used when mounting the device.
    :return:              Boolean if message was sent successfully.

    CLI Example:

    .. code-block:: bash

        salt '*' mount.write_mount_cache /mnt/share /dev/sda1 False ext4 defaults,nosuid