in reply to memory persistance

Do you see any particular advantage to keeping such a value in memory rather than reading and writing such a value to a file or database?

If speed were required, keep the file on a ramdisk.