Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump redis to 0.24. #176

Merged
merged 2 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading