Skip to content

Commit

Permalink
Fix deleting secondary index from redis on limit deletion
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Snaps <alex@wcgw.dev>
  • Loading branch information
alexsnaps committed Oct 8, 2024
1 parent 9cb6336 commit 1e83f81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions limitador/src/storage/redis/redis_async.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@ impl AsyncRedisStorage {
.await?;
}

con.del::<_, ()>(key_for_counters_of_limit(limit)).await?;

Ok(())
}
}
Expand Down
1 change: 1 addition & 0 deletions limitador/src/storage/redis/redis_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ impl CounterStorage for RedisStorage {
for counter_key in counter_keys {
con.del::<_, ()>(counter_key)?;
}
con.del::<_, ()>(key_for_counters_of_limit(limit))?;
}

Ok(())
Expand Down

0 comments on commit 1e83f81

Please sign in to comment.