Book Image

ServiceStack 4 Cookbook

Book Image

ServiceStack 4 Cookbook

Overview of this book

Table of Contents (18 chapters)
ServiceStack 4 Cookbook
About the Authors
About the Reviewers

Getting started with ServiceStack.Redis

Redis is a powerful tool with performance as its main focus. In this recipe, we will look at how to use different aspects of the ServiceStack.Redis client to help take full advantage of integrating with Redis.

Getting ready

Let's use Redis to enhance GreetingService. We'll store each greeting created in the Redis cache. We'll need Redis installed and running in order to store and retrieve values, which we can do by performing the following steps:

  1. Download the Redis .zip file from the Redis site at

    For this example, it is easiest to run the Redis server on Windows. Although Windows is not officially supported, MSOpenTech on GitHub does maintain a repository for Redis on Windows. This can be found at At the time of writing, a zip of the latest can be found in /bin/release of the repository.

  2. Extract the .zip file.

  3. Start the redis-server.exe binary, as follows:

  4. After Redis is running, we'll also...