superwf / vuex-cache

cache vuex action when dispatch
MIT License
510 stars 32 forks source link

feat: partially clear the cache by action name #51

Closed lukasbesch closed 3 years ago

lukasbesch commented 3 years ago

This PR adds an optional parameter to the store.cache.clear method to partially clear the cache by action name (regardless of the payload).

In opposite, the store.cache.delete method deletes one specific key (exact action name and payload).

If the an action name is specified, the number of cleared keys is returned. Otherwise, the boolean return type of the clear function is enforced (as Map.clear is void type).

VitorLuizC commented 3 years ago

Released under 3.4.0 version.