Quote:
Originally Posted by Infernuz
What's the point of nvault_touch if it only updates timestamp? I would as well want it to update my data.
|
Use
nvault_set() to update your data and the timestamp will update, too.
Quote:
Originally Posted by Infernuz
Do I have to first make a check if data exists and only then use nvault_set? (Finds first and replaces the data after)
Or does nvault_set do it automatically without creating a new record?
Nothing is mentioned if nvault_set updates or not.
|
Well the whole point of "keys" are that they are unique in the vault.
If it were to create new entries instead of updating, those keys would not be unique.
So the answer is: yes,
nvault_set() updates the data if it already exists.
__________________