I am using IonicStorageModule to store a key value pair in my project, and let’s say the value is a json object named JSONSTORE.
My question is,
I am storing new sets of values in JSONSTORE and using storage.set() on the same key that i already used.
I know that it will replace all the other previous data stored in the storage module.
But is it necessary for me to call storage.remove(key) to maintain performance improvements, or should i simply call storage.set() again without removing anything?
actually, i am using a setinterval function that calles the storage.set() again and again after some 10 seconds. and it is calling the storage.set() on a same key and the value is changing, but i need only the newest value. My question is whether without calling storage.remove(), will affect my storage performance?
simply calling storage.set() with the same key i called previusly will it remove the old value and store the new set of values or will it create a new instance of the store with the same key but different values?
Will it gets bigger over time? i dont want that to happen
No it will not store the same key value pair multiple times. (Doesn’t make sense to do so neither)
.set() will create and/or replace the key value pair. No need to call .remove()
But i am getting a json object every 10 second from an api that i should use though.
Is there any other method other than storing the value to show it in my page?