Preferences library on M5Core



  • Hi all !

    I'm planning to use the Preferences library to store some information in my M5Core. At some point i will need to change the values I'm storing there and one of these values is a large chunk of an html page (over 20 kB). Changes won't be needed that often so I don't think I'll harm the flash memory. However, what's my best strategy for updating ? Just save the new key value ? Set the key to a Null String then save the new page ? Remove the key then recreate it ? Does it make any difference in the way the flash memory is managed ?

    Thanks for your help,
    Daniel



  • as I recall there is a size limit when using Preference lib, so suggest you only use that for things like ssid and passwords. You can save your web pages in SPIFFS memory, try look here: https://randomnerdtutorials.com/esp32-vs-code-platformio-spiffs/