Skip to content

Commit 4149c75

Browse files
jaymellsvix-james
authored andcommitted
More redis refactors
This removes a lot of the needless indirection/structs that were obscuring what should be a pretty simple thing -- i.e., the different variants for `ConnectionManager`s and `RedisConnection`s. Note also that by moving some of the `query_async` calls to the `Cmd` rather than the connection, we can completely remove the `*Connection` types and associated macros. There's definitely some more cleanup that can be done here, but I think this is good for one PR.
1 parent ec61c65 commit 4149c75

File tree

2 files changed

+52
-258
lines changed

2 files changed

+52
-258
lines changed

server/svix-server/src/core/cache/redis.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ impl CacheBehavior for RedisCache {
5959

6060
cmd.arg("NX");
6161

62-
let res: Option<()> = pool.query_async(cmd).await?;
62+
let res: Option<()> = cmd.query_async(&mut pool).await?;
6363

6464
Ok(res.is_some())
6565
}

0 commit comments

Comments
 (0)