I have my node-red flow configured to use localfilesystem as contextStorage. I know that for every 30 seconds context variables are saved to the file system.
Is there a way to save these immediately to the file system as and when they are created,updated or deleted?
However rapidly you attempt to update it it can never be instantaneous, there will always be a window after it is changed before it is saved to disk during which the power may fail. That is true even if there were a flag you could set that said that immediately after updating a variable it is to be flushed to disc. The power could still fail in the gap between update and flush.
I am ok to loose data for a second or two and I don't want the flush interval to be too short as well. A flag or some other way for immediate update is what I am looking for.
Now I am a bit confused, if you turn of the cache it gets a synchronous store? You mean asynchronous?
And shouldn't the callback for the get have at least two parameters, because the first one is the error?