Running echo 'https://httpbin.org/delay/1 https://httpbin.org/delay/1' | cargo run - --max-concurrency=1 --host-stats -vv yields:
[200] https://httpbin.org/delay/1 (at 1:1)
[200] https://httpbin.org/delay/1 (at 1:29) | OK (cached)
🔍 2 Total (in 1s 571ms) ✅ 2 OK 🚫 0 Errors
📊 Per-host Statistics
────────────────────────────────────────────────────────────
httpbin.org │ 2 reqs │ 100.0% success │ 1553ms median │ 50.0% cached
I feel that | OK (cached) in the second line should not show up like this unless caching is explicitly enabled. The caching already happens on the per-host specific caching which I've recently improved concerning just this case with duplicate URLs, so that duplicate URLs should never be requested twice. (given that the response is successful)
The following line causes the caching.
|
cache.insert(uri, status.into()); |
@mre @katrinafyi Do you agree that this should only happen, if caching is explicitly enabled with --cache?
based on investigating @katrinafyi's comment
Running
echo 'https://httpbin.org/delay/1 https://httpbin.org/delay/1' | cargo run - --max-concurrency=1 --host-stats -vvyields:I feel that
| OK (cached)in the second line should not show up like this unless caching is explicitly enabled. The caching already happens on the per-host specific caching which I've recently improved concerning just this case with duplicate URLs, so that duplicate URLs should never be requested twice. (given that the response is successful)The following line causes the caching.
lychee/lychee-bin/src/commands/check.rs
Line 325 in caa7d5c
@mre @katrinafyi Do you agree that this should only happen, if caching is explicitly enabled with
--cache?based on investigating @katrinafyi's comment