Skip to content

Commit

Permalink
Update Redis adapter to handle TTL correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisllontop committed Apr 16, 2024
1 parent be5ca82 commit b1bca1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/store/adapter/redis/redis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl Store for RedisStore {
.map_err(|e| StoreError::SerializationError { source: e })?;

if let Some(expire) = ttl {
conn.set_ex(&namespaced_key, value_str, expire as usize)
conn.set_ex(&namespaced_key, value_str, expire)
.map_err(|e| StoreError::QueryError(e.to_string()))?;
} else {
conn.set(&namespaced_key, value_str)
Expand Down

0 comments on commit b1bca1b

Please sign in to comment.