Closed hvaughan3 closed 6 years ago
This is a nice suggestion!
@superwf it'll cause a breaking change, but seems really nice. A options object (optional) would be better than just the timeout, since we can attach other options to it in the future.
Example
import Vuex, { Store } from 'vuex';
import cache from 'vuex-cache';
const store = new Store({
plugins: [
cache({ timeout: 10000 })
]
})
Yea that makes more sense for sure. Thanks.
feature added, try a test?
@superwf Seems to work great! Thanks so much for the quick implementation.
I like the new timeout feature. It would be nice if we could set a default timeout while still being able to give a timeout per dispatch as well. Perhaps it could be passed into the constructor when the plugin is initialized: