I am using the StackExchange.Redis 1.0.450 nuget in C#. I have code like below which checks if a keyexists in redis before adding it -
if (!Cache.KeyExists(fKey))
{
Cache.StringSet(fKey, Serialize(data));
}
where Cache is Database object
I was reading about the redis SET command here http://redis.io/commands/set and found that SET will overwrite existing key value if it already exists. Using StackExchange.Redis can I safely remove the exist check condition and call just -
Cache.StringSet(fKey, Serialize(data));
Appreciate your response.