In StackExchange.Redis , STRING operations set expiration, for example:
Task<bool> StringSetAsync( RedisKey key, RedisValue value, TimeSpan? expiry = null, When when = When.Always, CommandFlags flags = CommandFlags.None);
Why does the SET operation not work?
Task<long> SetAddAsync( RedisKey key, RedisValue[] values, CommandFlags flags = CommandFlags.None);
Basically, this is what I want to achieve:
Given a List<T> , add the items to the Redis set (create or add to the existing one) after 1 hour.
How can I do it? Or should I serialize List<T> , then use StringSet ?
I want to use SET functions, such as SREM , and add individual elements to an existing SET (instead of overwriting the entire SET), so I try not to use STRING .
Any tips?
source share