19 introduces caching of scan results, however it only adds to the cache when a result is available. For big files, downloading and scanning can take enough time for many requests for it to come in, meaning we end up downloading and scanning the same file more than once. We should instead use a linearizer (similar to the one Synapse has) to queue up subsequent requests for a file if we're already scanning it, and respond to all of them with the results from the first scan.
19 introduces caching of scan results, however it only adds to the cache when a result is available. For big files, downloading and scanning can take enough time for many requests for it to come in, meaning we end up downloading and scanning the same file more than once. We should instead use a linearizer (similar to the one Synapse has) to queue up subsequent requests for a file if we're already scanning it, and respond to all of them with the results from the first scan.