MQTT5 retained message

Thanks. So just to be sure I'll recap it:

  • this writes immediatly on disk
file: {
      module: 'localfilesystem',
      config: {
            cache: false
      },
}

and in a function node:
context.set("mqttID", msg.payload.timestamp), "file", function(err){if(err){node.error(err, msg)}});

  • While this one writes on disk each second
file: {
      module: 'localfilesystem',
      config: {
            cache: true,
            flushInterval: '1'
      },
}

and in a function node, as above,
context.set("mqttID", msg.payload.timestamp), "file", function(err){if(err){node.error(err, msg)}});