Skip to content

Latest commit

 

History

History
68 lines (50 loc) · 4.76 KB

cache-redis-samples.md

File metadata and controls

68 lines (50 loc) · 4.76 KB
title description services documentationcenter author manager editor ms.assetid ms.service ms.workload ms.tgt_pltfrm ms.devlang ms.topic ms.date ms.author
Azure Redis Cache samples | Microsoft Docs
Learn how to use Azure Redis Cache
redis-cache
steved0x
douge
1f8d210c-ee09-4fe2-b63f-1e69246a27d8
cache
tbd
cache-redis
multiple
article
01/23/2017
sdanie

Azure Redis Cache samples

This topic provides a list of Azure Redis Cache samples, covering scenarios such as connecting to a cache, reading and writing data to and from a cache, and using the ASP.NET Redis Cache providers. Some of the samples are downloadable projects, and some provide step-by-step guidance and include code snippets but do not link to a downloadable project.

Hello world samples

The samples in this section show the basics of connecting to an Azure Redis Cache instance and reading and writing data to the cache using a variety of languages and Redis clients.

The Hello world sample shows how to perform various cache operations using the StackExchange.Redis .NET client.

This sample shows how to:

  • Use various connection options
  • Read and write objects to and from the cache using synchronous and asynchronous operations
  • Use Redis MGET/MSET commands to return values of specified keys
  • Perform Redis transactional operations
  • Work with Redis lists and sorted sets
  • Store .NET objects using JsonConvert serializers
  • Use Redis sets to implement tagging
  • Work with Redis Cluster

For more information, see the StackExchange.Redis documentation on github, and for more usage scenarios see the StackExchange.Redis.Tests unit tests.

How to use Azure Redis Cache with Python shows how to get started with Azure Redis Cache using Python and the redis-py client.

Work with .NET objects in the cache shows you one way to serialize .NET objects so you can write them to and read them from an Azure Redis Cache instance.

Use Redis Cache as a Scale out Backplane for ASP.NET SignalR

The Use Redis Cache as a Scale out Backplane for ASP.NET SignalR sample demonstrates how you can use Azure Redis Cache as a SignalR backplane. For more information about backplane, see SignalR Scaleout with Redis.

Redis Cache customer query sample

This sample demonstrates compares performance between accessing data from a cache and accessing data from persistence storage. This sample has two projects.

ASP.NET Session State and Output Caching

The Use Azure Redis Cache to store ASP.NET SessionState and OutputCache sample demonstrates how you to use Azure Redis Cache to store ASP.NET Session and Output Cache using the SessionState and OutputCache providers for Redis.

Manage Azure Redis Cache with MAML

The Manage Azure Redis Cache using Azure Management Libraries sample demonstrates how can you use Azure Management Libraries to manage - (Create/ Update/ delete) your Cache.

Custom monitoring sample

The Access Redis Cache Monitoring data sample demonstrates how you can access monitoring data for your Azure Redis Cache outside of the Azure Portal.

A Twitter-style clone written using PHP and Redis

The Retwis sample is the Redis Hello World. It is a minimal Twitter-style social network clone written using Redis and PHP using the Predis client. The source code is designed to be very simple and at the same time to show different Redis data structures.

Bandwidth monitor

The Bandwidth monitor sample allows you to monitor the bandwidth used on the client. To measure the bandwidth, run the sample on the cache client machine, make calls to the cache, and observe the bandwidth reported by the bandwidth monitor sample.