Skip to content

Commit

Permalink
Merge pull request #383 from Kuadrant/issue-378
Browse files Browse the repository at this point in the history
Fix deleting secondary index from redis on limit deletion
  • Loading branch information
alexsnaps authored Oct 9, 2024
2 parents ff12885 + 1e83f81 commit 7fe2cce
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 7fe2cce

Please sign in to comment.