Skip to content

Latest commit

 

History

History

aspnet-core

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
page_type languages name description products
sample
csharp
Quickstart: Use Azure Cache for Redis with an ASP.NET Core web app
Learn how to use an ASP.NET Core web application to connect to Azure Cache for Redis to store and retrieve data from the cache.
azure
aspnet-core
azure-cache-redis

Quickstart: Use Azure Cache for Redis with an ASP.NET Core web app

This sample shows you how to use an ASP.NET Core web application to connect to Azure Cache for Redis to store and retrieve data from the cache. Microsoft Entra ID is used to authenticate the connection to the Redis cache in Azure. See the accompanying article on the documentation site for details, including best practices and how to create the sample code from scratch.

Prerequisites

Run the sample in Azure

Download the sample code to your development PC.

In your command window, change directories to the folder containing this sample.

Execute the following command to restore the packages:

  1. Login to Azure from your azd command

    azd auth login
    
  2. Provision the Azure resources and deploy your web application

    azd up
    

Select Azure Cache for Redis Test in the navigation bar of the web page to test cache access.

  1. Tear down the resources to stay cost-efficient

    azd down
    

References