-
Notifications
You must be signed in to change notification settings - Fork 170
Description
Expected Behavior: After creating a new key with TTL, said key would be disposed without needing to call RedLockfactory.Dispose();
Current Behavior: After creating a new key with TTL, said key resets its TTL before getting expired and if manually deleted from the database with Redis Insights, the same key is not deleted and appears again after few seconds. This behavior keeps until my application is finished.
Here is a simple working example of the issue
When i try creating a new key on redis, it successfully does, but does said key does not expire when it reach its TTL, instead it resets the key's TTL to its original value and keeps that way until i finish the application.
What i have tried:
- Doing a new request does not seems to work
- Setting RedisService to Scoped also does not help, even though in theory after a request, the instance would be destroyed and so would be the RedLockFactory property
- Adding a deconstructor calling RedLockFactory.Dispose() on RedisService also does not work
- If I try call redLock.Dispose() on TestRegister(), it does work, but the key is instantly deleted from the database
I'm creating this issue to be sure that this is the intended behavior and how should i proceed



