A "cache" logic might reduce the response time and the complex of reading action.
For example, a cache with dictionary structure -
User could load this dictionary cache by reading all key-value pairs into memory, then these values could be read immediately.
The structure stored in local storage might be
- Index: A JSON sting to store the keys
- Content: Key - value pairs
Plugin first read index, then read all key-value pairs. And the manipulation of this dictionary cache is just like official dictionary object.
Writing action might be triggered after ticking (in tick2() maybe), to write key-value pairs with dirty bit = 1.