Reputation: 13
We are having problem with ServiceStack Redis Client that TTL property is not working as we expect. When we browse redis desktop manager we see that our lock key has no TTL value set.
Do you have any recommendation ?
Here is the sample code as recommended:
using (var redisManager = new PooledRedisClientManager(dbindex, redisUri))
using (var redisClient = redisManager.GetClient())
{
return redisClient.AcquireLock("locks:" + key, new TimeSpan(0,1,0));
}
Upvotes: 1
Views: 561
Reputation: 143319
The Timeout is used within the content of the lock string to calculate an expired lock, i.e. it doesn't change the TTL of the lock key.
Upvotes: 1