To set an expiry for a key as it is being created, we can use StringSetAsync and pass a timestamp value for expiry. However, this is not possible if we want to set multiple key-value-pairs at once -
Task<bool> StringSetAsync(KeyValuePair<RedisKey, RedisValue>[] values, When when = When.Always, CommandFlags flags = CommandFlags.None);
Task<bool> StringSetAsync(RedisKey key, RedisValue value, TimeSpan? expiry = default(TimeSpan?), When when = When.Always, CommandFlags flags = CommandFlags.None);
Is it possible to set the expiry for all keys at the cache level on azure somewhere? I could not find the answer in any documentation. I want to set the kvps all at once to reduce the number of calls to azure redis cache. I also could not find any upper limit to this. How many keys at max can we get and set in one call?