Skip to content

Commit 54f2011

Browse files
committed
edit pass: integrate-azure-cache-for-redis-with-service-connector
1 parent 4df37df commit 54f2011

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

articles/service-connector/includes/code-redis-me-id.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ ms.author: xiaofanzhou
2929
// var managedIdentityClientId = Environment.GetEnvironmentVariable("AZURE_REDIS_CLIENTID");
3030
// await configurationOptions.ConfigureForAzureWithUserAssignedManagedIdentityAsync(managedIdentityClientId);
3131
32-
// Service principal secret
32+
// Service principal secret.
3333
// var clientId = Environment.GetEnvironmentVariable("AZURE_REDIS_CLIENTID");
3434
// var tenantId = Environment.GetEnvironmentVariable("AZURE_REDIS_TENANTID");
3535
// var secret = Environment.GetEnvironmentVariable("AZURE_REDIS_CLIENTSECRET");
@@ -90,8 +90,8 @@ ms.author: xiaofanzhou
9090
String username = extractUsernameFromToken(token);
9191
String cacheHostname = System.getenv("AZURE_REDIS_HOST");
9292
93-
// Create Jedis client and connect to the Azure Cache for Redis over the TLS/SSL port using the access token as password.
94-
// Note, Redis Cache Host Name and Port are required below
93+
// Create Jedis client and connect to Azure Cache for Redis over the TLS/SSL port using the access token as password.
94+
// Note, Redis Cache host name and port are required below.
9595
Jedis jedis = new Jedis(cacheHostname, 6380, DefaultJedisClientConfig.builder()
9696
.password(token) // Microsoft Entra access token as password is required.
9797
.user(username) // Username is Required
@@ -246,7 +246,7 @@ ms.author: xiaofanzhou
246246
console.log("access Token", accessToken);
247247
const host = process.env.AZURE_REDIS_HOST;
248248
249-
// Create redis client and connect to the Azure Cache for Redis over the TLS port using the access token as password.
249+
// Create redis client and connect to Azure Cache for Redis over the TLS port using the access token as password.
250250
const client = createClient({
251251
username: extractUsernameFromToken(accessToken),
252252
password: accessToken.token,
@@ -260,9 +260,9 @@ ms.author: xiaofanzhou
260260
261261
client.on("error", (err) => console.log("Redis Client Error", err));
262262
await client.connect();
263-
// Set a value against your key in the Azure Redis Cache.
263+
// Set a value against your key in Azure Redis Cache.
264264
await client.set("Az:key", "value1312");
265-
// Get value of your key in the Azure Redis Cache.
265+
// Get value of your key in Azure Redis Cache.
266266
console.log("value-", await client.get("Az:key"));
267267
}
268268

0 commit comments

Comments
 (0)