martyjs/marty

Remove id from fetchHistory

Closed this issue · 2 comments

Is there a better way to remove an id from fetchHistory other than delete this.__fetchHistory['id'] ?

I have a store function getAll() that does a fetch for all items.
I then have a couple of Containers with pending handlers and such.
I then have an refresh action that the store handles where i do delete this.__fetchHistory['all'] so i can reuse all the containers pending handlers.

Would be nice with an 'official' way for this maybe.

Related i would be nice to have an 'official' way to remove something from failedFetches also.
See #284
Now i have a refresh action that my store handles and does delete this.__failedFetches[id] to fetch again.

taion commented

Maybe we can add a refresh argument to Store#fetch that will bypass the locally stored value and always trigger a remote fetch (if one is not pending)?

@taion This would be great!