Open asarazan opened 4 years ago
does job?.join()
dedupe by equals()
, hashCode()
, or some other mechanism? aka, can I define what a duplicate means by modifying my data model?
Generally this happens at a different layer than the job
or coroutine
system. Basically it just means if there's already an in-flight request happening, and there hasn't been an invalidate call since the request started, it will not initiate a new request, and will instead piggyback the existing one.
i can think of folks who might prefer a new request to replace the duplicate instead. i'm not necessarily advocating for DedupingBismarck
to come back, but i'm not yet convinced this is an opinion our default should hold.
I mean what does freshness mean if you're not going to trust it? If you turn off the freshness strategy then you can be guaranteed a new network call for every fetch invoked.
I didn't like the class hierarchy that we had, so I switched it to dedupe outgoing calls by default. I don't see a lot of utility in the dumb approach but I'm open to arguments