In the Redis documentation when you call the Get operation and key doesn’t exist, it is supposed to return Nil. (Source: http://redis.io/commands/get)
How does the ServiceStack client handle this? Does it reutn null, or do I need to use Exists, ContainsKey?
Is there another approach to check if key exists and return value using one request?
You’ll get null back if you try to get a key that does not exist.
There are lots of different ways to get keys using IRedisClient, but here’s an example:
GetValue()
If you’re interested IRedisNativeClient goes directly against the metal in a 1-1 command fashion.
You can do multiple things in one request by using a pineline or transaction. For example: