From 05e1822299ad1acff3be27cb5ca5ca1e1a60e20c Mon Sep 17 00:00:00 2001 From: phiresky Date: Tue, 9 Jun 2020 22:45:42 +0200 Subject: [PATCH] custom adapters doc file (incomplete) --- doc/Custom adapters.md | 9 +++++++++ src/preproc_cache.rs | 5 ++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 doc/Custom adapters.md diff --git a/doc/Custom adapters.md b/doc/Custom adapters.md new file mode 100644 index 0000000..cba98b7 --- /dev/null +++ b/doc/Custom adapters.md @@ -0,0 +1,9 @@ +## Custom adapters + +Since [version], you can specify custom adapters that invoke external preprocessing scripts in the config file. + +[Todo: how] + +[Todo: why not just use --pre yourself (copy/see https://github.com/phiresky/ripgrep-all/issues/60)] + +If you think your adapter config is useful, you can share it by opening an issue with the title: "Custom adapter: xyz" diff --git a/src/preproc_cache.rs b/src/preproc_cache.rs index f02cfa3..27915c6 100644 --- a/src/preproc_cache.rs +++ b/src/preproc_cache.rs @@ -94,7 +94,10 @@ impl PreprocCache for LmdbCache { match cached { Some(rkv::Value::Blob(cached)) => { - debug!("cache HIT, reading from cache"); + debug!( + "cache HIT, reading {} (compressed) from cache", + print_bytes(cached.len() as f64) + ); debug!("reading from cache took {}", print_dur(start)); callback(cached)?; }