After used vuex-cache code for a while I realize it's methods is very similar to Map methods and doing some researches I also confirmed that Maps are better than pure objects(Object.create(null)).
So I'd changed cache constant to a Map instance, added dispatch method and expose it. Now all Map methods and dispatch is available under store.cache namespace. Also I'd changed the unit tests and README.
In fact, now this lib is faster and smaller, and the only side effects is IE11- that needs Map polyfill to run properly.
After used
vuex-cache
code for a while I realize it's methods is very similar toMap
methods and doing some researches I also confirmed that Maps are better than pure objects(Object.create(null)
).So I'd changed
cache
constant to a Map instance, addeddispatch
method and expose it. Now all Map methods anddispatch
is available understore.cache
namespace. Also I'd changed the unit tests and README.In fact, now this lib is faster and smaller, and the only side effects is IE11- that needs Map polyfill to run properly.