How to specify RedisCache timeout

Hi,

I am trying to set up ServiceStack to use IRedisCacheClient. Is there a way I can specify the cache timeout when setting up the cache client in global.asax?

container.Register<IRedisClientsManager>(c => new RedisManagerPool(redisConnectionString));

I have tried couple of the properties like IdleTimeout and it does not seem to work.

Thanks,
Leeny

What Timeout are you referring to, connection timeout?

The different global Timeouts are available in the RedisConfig class.

Hi Demis,

Is there a timeout we can specify to indicate when the cache should expire?

Thanks,
Leeny

There are overloads on each ICacheClient Add/Set/Replace APIs which accept either a TimeSpan expiresIn or DateTime expiresAt when the cache entry should expire.