Drop the in-flight entries whose key contains pathSegment, so a call
made after a write cannot join a request sent before it.
The requests themselves keep running and whoever already joined them still
gets their answer. Only the map entry goes, which is what new callers look
in. Matching is includes, the same rule ETagCacheManager.deleteByPath
uses, so one written path invalidates the cache and detaches the reads of
it by the same test.
Drop the in-flight entries whose key contains
pathSegment, so a call made after a write cannot join a request sent before it.The requests themselves keep running and whoever already joined them still gets their answer. Only the map entry goes, which is what new callers look in. Matching is
includes, the same rule ETagCacheManager.deleteByPath uses, so one written path invalidates the cache and detaches the reads of it by the same test.