All methods are cached
PUT, POST, DELETE methods aren't executed when cache is enabled (and a previous request has been made within the cache window)
This is really problematic, only GET methods should be cached. I think something like this should fix it:
const cacheManager = params.method === 'GET' && getCacheManager(options.expire, meta.cache);
https://github.com/lexich/redux-api/blob/master/src/actionFn.js#L59
Otherwise the cache works fine now (#135)
Yes, I think that you are right, but I don't think that fix should be so simple :)
Well, I tried :)
On a side note I have another problem: I can't PUT 2 elements simultaneously due to this line https://github.com/lexich/redux-api/blob/master/src/actionFn.js#L132 the second gets ignored. Is there any workaround?
You can't do this if you control state. But if you need put without update state (2 simultaneously request) you shoud use request method. It's simple request without redux wrappers
Yes you're right thanks !
Having the same issue. Has this been resolved? or is there a simple workaround?
@ianloubser use .request method and control state manually
Sorry I meant for the cached POST, PUT and DELETE methods. The original issue described here