File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -301,6 +301,8 @@ struct Args {
301301 flag_progressbar : bool ,
302302}
303303
304+ // set memcache size - the default is 2 million entries
305+ // and is set through the docopt usage text
304306static MEM_CACHE_SIZE : OnceLock < usize > = OnceLock :: new ( ) ;
305307
306308// connect to Redis at localhost, using database 1 by default when --redis is enabled
@@ -417,7 +419,9 @@ pub fn run(argv: &[&str]) -> CliResult<()> {
417419 String :: new ( )
418420 } ;
419421
420- let cache_type = if args. flag_disk_cache {
422+ let cache_type = if args. flag_no_cache {
423+ CacheType :: None
424+ } else if args. flag_disk_cache {
421425 // if --flush-cache is set, flush the cache directory first if it exists
422426 if args. flag_flush_cache
423427 && !diskcache_dir. is_empty ( )
@@ -465,8 +469,6 @@ pub fn run(argv: &[&str]) -> CliResult<()> {
465469 info ! ( "flushed Redis database." ) ;
466470 }
467471 CacheType :: Redis
468- } else if args. flag_no_cache {
469- CacheType :: None
470472 } else {
471473 CacheType :: InMemory
472474 } ;
You can’t perform that action at this time.
0 commit comments