Reputation: 813
What happens if the passed key to StackExchange.Redis KeyDelete method is not available in the redis cache. Does it throws any exception or does it handles the missing key internally without throwing any exception?
long KeyDelete(RedisKey[] keys, CommandFlags flags = CommandFlags.None);
Upvotes: 0
Views: 2837
Reputation: 73243
If you hit F12 on KeyDelete to see the definition, it tells you there that "A key is ignored if it does not exist"
// Summary:
// Removes the specified keys. A key is ignored if it does not exist.
//
// Returns:
// The number of keys that were removed.
//
// Remarks:
// http://redis.io/commands/del
long KeyDelete(RedisKey[] keys, CommandFlags flags = CommandFlags.None);
Upvotes: 2