diff --git a/examples/poem/redis-session/Cargo.toml b/examples/poem/redis-session/Cargo.toml index 1defa68d57..0c39f07e1f 100644 --- a/examples/poem/redis-session/Cargo.toml +++ b/examples/poem/redis-session/Cargo.toml @@ -8,4 +8,4 @@ publish.workspace = true poem = { workspace = true, features = ["redis-session"] } tokio = { workspace = true, features = ["rt-multi-thread", "macros"] } tracing-subscriber.workspace = true -redis = { version = "0.23.0", features = ["aio", "tokio-comp", "connection-manager"] } +redis = { version = "0.24.0", features = ["aio", "tokio-comp", "connection-manager"] } diff --git a/poem/Cargo.toml b/poem/Cargo.toml index 79dd54cfee..bdeaaa7059 100644 --- a/poem/Cargo.toml +++ b/poem/Cargo.toml @@ -116,7 +116,7 @@ chrono = { workspace = true, optional = true, default-features = false, features time = { version = "0.3", optional = true } mime_guess = { version = "2.0.3", optional = true } rand = { version = "0.8.4", optional = true } -redis = { version = "0.23.0", optional = true, features = [ +redis = { version = "0.24.0", optional = true, features = [ "aio", "tokio-comp", "connection-manager", diff --git a/poem/src/session/redis_storage.rs b/poem/src/session/redis_storage.rs index fb93b827aa..148673824d 100644 --- a/poem/src/session/redis_storage.rs +++ b/poem/src/session/redis_storage.rs @@ -47,7 +47,7 @@ impl SessionStorage for RedisStorage ) -> Result<()> { let value = serde_json::to_string(entries).unwrap_or_default(); let cmd = match expires { - Some(expires) => Cmd::set_ex(session_id, value, expires.as_secs() as usize), + Some(expires) => Cmd::set_ex(session_id, value, expires.as_secs()), None => Cmd::set(session_id, value), }; cmd.query_async(&mut self.connection.clone())