I am using localForage to store some data on a website to make it offline.
I would like to have one key and append to the value / array.
So far I can only figure how to retrieve the entire key/value from storage, then append and set the entire key/value again. This seems very wasteful and might be problematic when the key/value gets larger.
var obj = ...
localforage.getItem('documents', function(err, value) {
value.push(obj);
localforage.setItem('documents', value);
}
Is there not a more efficient way of doing this? and how big would the key/value have to be to notice performance issues.
key-1
,key-2
, and so on. – Scalawag