Skip to content

Commit

Permalink
deps: cached crate now uses redis 0.27
Browse files Browse the repository at this point in the history
  • Loading branch information
jqnatividad committed Nov 14, 2024
1 parent c9adced commit 479025a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 19 deletions.
21 changes: 13 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ rand = "0.8"
rand_hc = "0.3"
rand_xoshiro = "0.6"
rayon = "1.10"
redis = { version = "0.25", features = [
redis = { version = "0.27", features = [
"ahash",
"tcp_nodelay",
], default-features = false, optional = true }
Expand Down Expand Up @@ -293,6 +293,9 @@ csv = { git = "https://github.com/jqnatividad/rust-csv", branch = "qsv-opt
csv-core = { git = "https://github.com/jqnatividad/rust-csv", branch = "qsv-optimized-non-allocating-byterecord-trim" }
csv-index = { git = "https://github.com/jqnatividad/rust-csv", branch = "qsv-optimized-non-allocating-byterecord-trim" }

# use cached with bumped redis using 0.27
cached = { git = "https://github.com/jaemk/cached", rev = "bbf457e" }

# use calamine with unreleased fixes
calamine = { git = "https://github.com/tafia/calamine", rev = "cf86fa7" }

Expand Down
8 changes: 3 additions & 5 deletions src/cmd/fetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -476,11 +476,9 @@ pub fn run(argv: &[&str]) -> CliResult<()> {
}

if args.flag_flush_cache {
// TODO: replace deprecated redis::execute once we bump redis to 0.27
// redis::cmd("FLUSHDB")
// .exec(&mut redis_conn)
// .map_err(|_| "Cannot flush Redis cache")?;
redis::cmd("FLUSHDB").execute(&mut redis_conn);
redis::cmd("FLUSHDB")
.exec(&mut redis_conn)
.map_err(|_| "Cannot flush Redis cache")?;
info!("flushed Redis database.");
}
CacheType::Redis
Expand Down
8 changes: 3 additions & 5 deletions src/cmd/fetchpost.rs
Original file line number Diff line number Diff line change
Expand Up @@ -433,11 +433,9 @@ pub fn run(argv: &[&str]) -> CliResult<()> {
}

if args.flag_flush_cache {
// TODO: replace deprecated redis::execute once we bump redis to 0.27
// redis::cmd("FLUSHDB")
// .exec(&mut redis_conn)
// .map_err(|_| "Cannot flush Redis cache")?;
redis::cmd("FLUSHDB").execute(&mut redis_conn);
redis::cmd("FLUSHDB")
.exec(&mut redis_conn)
.map_err(|_| "Cannot flush Redis cache")?;
info!("flushed Redis database.");
}
CacheType::Redis
Expand Down

0 comments on commit 479025a

Please sign in to comment.