Explanation: Box 1: IDatabase cache = connection.GetDatabase(); Connection refers to a previously configured ConnectionMultiplexer. Box 2: cache.StringSet("teams",") To specify the expiration of an item in the cache, use the TimeSpan parameter of StringSet. cache.StringSet("key1", "value1", TimeSpan.FromMinutes(90)); References: https://azure.microsoft.com/sv-se/blog/lap-around-azure-redis-cache-preview/