superwf / vuex-cache

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

Should we dismiss action errors? #18

Closed VitorLuizC closed 5 years ago

VitorLuizC commented 5 years ago

Cache promise rejections is a common question (#7, #16), and I believe we need to discuss if we need cache actions errors or dismiss them?

Pros

Cons

VitorLuizC commented 5 years ago

CC: @superwf and @wcxaa

wcxaa commented 5 years ago

I think its better to let user retry then to always return a rejection when rejected by network errors .

VitorLuizC commented 5 years ago

@wcxaa totally agree, seems pretty smart to cache only resolved promises.

VitorLuizC commented 5 years ago

@superwf If you agree I can make the PR with this change, but it have to be a breaking change and we need to bump to version 2.

superwf commented 5 years ago

@VitorLuizC just do what you could to make it better. In this year my team change to use react for company jobs and I did not use vue for more than a year. So I am glad to accept suggestion from real vue user. Would you like to be a collaborator of this repo?

VitorLuizC commented 5 years ago

@superwf I really like this project and it'll would be such nice!