From 5bef6029584fe225f8eadfe211a8a223e54b1cf9 Mon Sep 17 00:00:00 2001 From: Steve Mokris Date: Thu, 9 Jan 2020 17:06:58 -0500 Subject: [PATCH] In readme and built-in help, add cache location on macOS and Windows. --- README.md | 12 +++++++++--- src/args.rs | 5 ++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0f826d7..6605c8f 100644 --- a/README.md +++ b/README.md @@ -174,8 +174,11 @@ The following adapters are disabled by default, and can be enabled using '--rga- > Disable caching of results > -> By default, rga caches the extracted text to a database in -> \~/.cache/rga if it is small enough. This way, repeated searches on +> By default, rga caches the extracted text, if it is small enough, +> to a database in `~/Library/Caches/rga` on macOS, +> `~/.cache/rga` (on other Unixes), +> or `C:\Users\username\AppData\Local\rga` (on Windows). +> This way, repeated searches on > the same set of files will be much faster. If you pass this flag, all > caching will be disabled. @@ -234,4 +237,7 @@ export RUST_LOG=debug export RUST_BACKTRACE=1 ``` -Also rember to disable caching with `--rga-no-cache` or clear the cache in `~/.cache/rga` to debug the adapters. +Also remember to disable caching with `--rga-no-cache` or clear the cache +(`~/Library/Caches/rga` on macOS, `~/.cache/rga` on other Unixes, +or `C:\Users\username\AppData\Local\rga` on Windows) +to debug the adapters. diff --git a/src/args.rs b/src/args.rs index 6453ea2..fbbdbeb 100644 --- a/src/args.rs +++ b/src/args.rs @@ -40,7 +40,10 @@ pub struct RgaArgs { #[structopt(long = "--rga-no-cache")] /// Disable caching of results /// - /// By default, rga caches the extracted text to a database in ~/.cache/rga if it is small enough. + /// By default, rga caches the extracted text, if it is small enough, + /// to a database in ~/Library/Caches/rga on macOS, + /// ~/.cache/rga on other Unixes, + /// or C:\Users\username\AppData\Local\rga` on Windows. /// This way, repeated searches on the same set of files will be much faster. /// If you pass this flag, all caching will be disabled. pub no_cache: bool,