You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Redis-py](https://github.com/andymccurdy/redis-py) is a Python interface to Azure Cache for Redis. Use the Python packages tool, *pip*, to install the redis-py package.
38
+
[Redis-py](https://github.com/andymccurdy/redis-py) is a Python interface to Azure Cache for Redis. Use the Python packages tool, *pip*, to install the *redis-py* package from a command prompt.
39
39
40
-
The following example uses *pip3* for Python3 to install the redis-py package on Windows 10 using a Visual Studio 2019 Developer Command prompt running with elevated Administrator privileges.
41
-
42
-
```python
43
-
pip3 install redis
44
-
```
40
+
The following example used *pip3* for Python 3 to install *redis-py* on Windows 10 from an Administrator command prompt.
45
41
46
42

47
43
48
-
49
44
## Read and write to the cache
50
45
51
-
Run Python and test using the cache from the command line. Replace `<Your Host Name>` and `<Your Access Key>` with the values for your Azure Cache for Redis.
46
+
Run Python from the command line and test your cache by using the following code. Replace `<Your Host Name>` and `<Your Access Key>` with the values from your Azure Cache for Redis instance.
52
47
53
48
```python
54
49
>>>import redis
55
-
>>> r = redis.StrictRedis(host='<Your Host Name>.redis.cache.windows.net',
50
+
>>> r = redis.StrictRedis(host='<Your Host Name>',
> For Redis version is 3.0 or higher, SSL certificate check is enforced. ssl_ca_certs must be explicitly set when connecting to Redis. In case of RH Linux, ssl_ca_certs can be found in the "/etc/pki/tls/certs/ca-bundle.crt" certificate module.
65
-
66
-
## Create a Python script
59
+
> For Azure Cache for Redis version 3.0 or higher, SSL certificate check is enforced. ssl_ca_certs must be explicitly set when connecting to Azure Cache for Redis. For RedHat Linux, ssl_ca_certs are in the */etc/pki/tls/certs/ca-bundle.crt* certificate module.
67
60
68
-
Create a new script text file named *PythonApplication1.py*.
61
+
## Create a Python sample app
69
62
70
-
Add the following script to *PythonApplication1.py* and save the file. This script will test the cache access. Replace `<Your Host Name>` and `<Your Access Key>` with the values for your Azure Cache for Redis.
63
+
Create a new text file, add the following script, and save the file as *PythonApplication1.py*. Replace `<Your Host Name>` and `<Your Access Key>` with the values from your Azure Cache for Redis instance.

89
+
Run the sample app with Python to see results like the following example:
99
90
91
+

100
92
101
93
## Clean up resources
102
94
103
-
If you will be continuing with another tutorial, you can keep the resources created in this quickstart and reuse them.
104
-
105
-
Otherwise, if you are finished with the quickstart sample application, you can delete the Azure resources created in this quickstart to avoid charges.
95
+
If you're finished with the Azure resource group and resources you created in this quickstart, you can delete them to avoid charges.
106
96
107
97
> [!IMPORTANT]
108
-
> Deleting a resource group is irreversible and that the resource group and all the resources in it are permanently deleted. Make sure that you do not accidentally delete the wrong resource group or resources. If you created the resources for hosting this sample inside an existing resource group that contains resources you want to keep, you can delete each resource individually from their respective blades instead of deleting the resource group.
109
-
>
110
-
111
-
Sign in to the [Azure portal](https://portal.azure.com) and select **Resource groups**.
112
-
113
-
In the **Filter by name...** text box, enter the name of your resource group. The instructions for this article used a resource group named *TestResources*. On your resource group in the result list, select **...** then **Delete resource group**.
114
-
115
-

98
+
> Deleting a resource group is irreversible, and the resource group and all the resources in it are permanently deleted. If you created your Azure Cache for Redis instance in an existing resource group that you want to keep, you can delete just the cache by selecting **Delete** from the cache **Overview** page.
116
99
117
-
You will be asked to confirm the deletion of the resource group. Enter the name of your resource group to confirm, and select **Delete**.
100
+
To delete the resource groupand all its resources:
118
101
119
-
After a few moments, the resource group and all of its contained resources are deleted.
102
+
1. From the [Azure portal](https://portal.azure.com), search for and select **Resource groups**.
103
+
1. In the **Filter by name** text box, enter the name of your resource group, and then select it from the search results.
104
+
1. On your resource group page, select **Delete resource group**.
105
+
1. Type the resource group name, and then select **Delete**. The resource group and all of its resources are deleted.
106
+

120
107
121
108
## Next steps
122
109
123
110
> [!div class="nextstepaction"]
124
111
> [Create a simple ASP.NET web app that uses an Azure Cache for Redis.](./cache-web-app-howto.md)
Copy file name to clipboardExpand all lines: includes/redis-cache-access-keys.md
+8-10Lines changed: 8 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -5,22 +5,20 @@ services: redis-cache
5
5
author: wesmc7777
6
6
ms.service: cache
7
7
ms.topic: "include"
8
-
ms.date: 03/28/2018
8
+
ms.date: 11/01/2019
9
9
ms.author: wesmc
10
10
ms.custom: "include file"
11
11
---
12
12
13
-
### Retrieve host name, ports, and access keys by using the Azure portal
13
+
### Retrieve host name, ports, and access keys from the Azure portal
14
14
15
-
When connecting to an Azure Cache for Redis instance, cache clients need the host name, ports, and a key for the cache. Some clients might refer to these items by slightly different names. You can retrieve this information in the Azure portal.
15
+
To connect to an Azure Cache for Redis instance, cache clients need the host name, ports, and a key for the cache. Some clients might refer to these items by slightly different names. You can get the host name, ports, and keys from the [Azure portal](https://portal.azure.com).
16
16
17
-
#### To retrieve the access keys and host name
17
+
- To get the access keys, from your cache left navigation, select **Access keys** .
18
+
19
+

18
20
19
-
1. To retrieve the access keys by using the [Azure portal](https://portal.azure.com), go to your cache and select **Access keys**.
21
+
- To get the host name and ports, from your cache left navigation, select **Properties**.
20
22
21
-

22
-
23
-
2. To retrieve the host name and ports, select **Properties**.
24
-
25
-

23
+

Copy file name to clipboardExpand all lines: includes/redis-cache-create.md
+26-23Lines changed: 26 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -5,32 +5,35 @@ services: redis-cache
5
5
author: wesmc7777
6
6
ms.service: cache
7
7
ms.topic: "include"
8
-
ms.date: 03/28/2018
8
+
ms.date: 11/01/2019
9
9
ms.author: wesmc
10
10
ms.custom: "include file"
11
11
---
12
12
13
13
14
-
1. To create a cache, first sign in to the [Azure portal](https://portal.azure.com). Then select **Create a resource** > **Databases** > **Azure Cache for Redis**.
15
-
16
-

17
-
18
-
2. In **New Azure Cache for Redis**, configure the settings for your new cache.
|**DNS name**| Globally unique name | The cache name. It must be a string between 1 and 63 characters and contain only numbers, letters, and the `-` character. The cache name cannot start or end with the `-` character, and consecutive `-` characters are not valid. |
23
-
|**Subscription**| Your subscription | The subscription under which this new Azure Cache for Redis instance is created. |
24
-
|**Resource group**|*TestResources*| Name for the new resource group in which to create your cache. By putting all the resources for an app in a group, you can manage them together. For example, deleting the resource group deletes all resources that are associated with the app. |
25
-
|**Location**| East US | Choose a [region](https://azure.microsoft.com/regions/) near to other services that will use your cache. |
26
-
|**[Pricing tier](https://azure.microsoft.com/pricing/details/cache/)**| Basic C0 (250 MB Cache) | The pricing tier determines the size, performance, and features that are available for the cache. For more information, see [Azure Cache for Redis Overview](../articles/azure-cache-for-redis/cache-overview.md). |
27
-
|**Pin to dashboard**| Selected | Pin the new cache to your dashboard to make it easy to find. |
28
-
29
-

30
-
31
-
3. After the new cache settings are configured, select **Create**.
32
-
33
-
It can take a few minutes for the cache to be created. To check the status, you can monitor the progress on the dashboard. After the cache has been created, it shows the status **Running**, and is ready for use.
34
-
35
-

14
+
1. To create a cache, sign in to the [Azure portal](https://portal.azure.com) and select **Create a resource**.
15
+
16
+

17
+
18
+
1. On the **New** page, select **Databases** and then select **Azure Cache for Redis**.
19
+
20
+

21
+
22
+
1. On the **New Redis Cache** page, configure the settings for your new cache.
|**DNS name**| Enter a globally unique name. | The cache name must be a string between 1 and 63 characters and contain only numbers, letters, or hyphens. The name must start and end with a number or letter, and not contain consecutive hyphens. |
27
+
|**Subscription**| Drop down and select your subscription. | The subscription under which to create this new Azure Cache for Redis instance. |
28
+
|**Resource group**| Drop down and select a resource group, or select **Create new** and enter a new resource group name. | Name for the resource group in which to create your cache and other resources. By putting all your app resources in one resource group, you can easily manage or delete them together. |
29
+
|**Location**| Drop down and select a location. | Select a [region](https://azure.microsoft.com/regions/) near other services that will use your cache. |
30
+
|**Pricing tier**| Drop down and select a [Pricing tier](https://azure.microsoft.com/pricing/details/cache/). | The pricing tier determines the size, performance, and features that are available for the cache. For more information, see [Azure Cache for Redis Overview](../articles/azure-cache-for-redis/cache-overview.md). |
31
+
32
+
1. Select **Create**.
33
+
34
+

35
+
36
+
It takes awhile for the cache to create. You can monitor progress on the Azure Cache for Redis **Overview** page. When **Status** shows as **Running**, the cache is ready to use.
37
+
38
+

0 commit comments