Skip to content

Commit

Permalink
Merge pull request #176 from jqnatividad/bump-redis-0.24
Browse files Browse the repository at this point in the history
bump redis to 0.24.
  • Loading branch information
jaemk authored Jan 3, 2024
2 parents e215f55 + 6826bf0 commit 013442f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ version = "0.1"
optional = true

[dependencies.redis]
version = "0.23"
version = "0.24"
features = ["r2d2"]
optional = true

Expand Down
8 changes: 4 additions & 4 deletions src/stores/redis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ where

pipe.get(key.clone());
if self.refresh {
pipe.expire(key, self.seconds as usize).ignore();
pipe.expire(key, self.seconds as i64).ignore();
}
// ugh: https://github.com/mitsuhiko/redis-rs/pull/388#issuecomment-910919137
let res: (Option<String>,) = pipe.query(&mut *conn)?;
Expand Down Expand Up @@ -300,7 +300,7 @@ where
key,
serde_json::to_string(&val)
.map_err(|e| RedisCacheError::CacheSerializationError { error: e })?,
self.seconds as usize,
self.seconds,
)
.ignore();

Expand Down Expand Up @@ -555,7 +555,7 @@ mod async_redis {

pipe.get(key.clone());
if self.refresh {
pipe.expire(key, self.seconds as usize).ignore();
pipe.expire(key, self.seconds as i64).ignore();
}
let res: (Option<String>,) = pipe.query_async(&mut conn).await?;
match res.0 {
Expand Down Expand Up @@ -584,7 +584,7 @@ mod async_redis {
key,
serde_json::to_string(&val)
.map_err(|e| RedisCacheError::CacheSerializationError { error: e })?,
self.seconds as usize,
self.seconds as u64,
)
.ignore();

Expand Down

0 comments on commit 013442f

Please sign in to comment.