My application requires rather frequent write and read of a virtual resource during the device operation. Since it’s detrimental to write to Flash memory very often I prefer to work with non-persistent VRs which are possible to make according to the documentation and I don’t care if they get wiped out after device power cycle.
Do I understand correctly, these non-persistent virtual resources are stored in some sort of RAM and are never written into Flash?
Your understanding is almost correct.
Non-persistent virtual resources are indeed stored in RAM and not in Flash memory. At the opposite, regular Virtal Resources values are persisted in Flash but - and this is where you make a little mistake - the values are not persisted at the frequency of the write, but every 60 seconds at maximum. Also, Flash write occurs only when the value is different from the persisted one.
This is described in the documentation page you point out: documentation
The values of the resources are written in the flash memory :
- every 60 seconds,
- when the Virtual Resource configuration is updated,
- when the edge goes to low power mode,
- when edge reboot command is triggered: /util/reboot/trigger.
Hope this helps,