A guide to understanding 'Persistent Context'

Here is the breakdown on how the persistant context is stored,

Here is what the flow.json contains in these examples:
Screen Shot 2020-12-12 at 4.55.53 AM

Bottom line - you would need to save each context item as an object that contained a value AND a timestamp. Then in a flow in your project, you would need to parse thru each of the context items to check it's timestamp and then delete that context item.

While you could edit the file itself and remove the items, you would have to stop Node-RED, edit the file and then start Node-RED again.

8 Likes