Skip to content

Commit 4bdac21

Browse files
committed
acrolinx
1 parent a3fb707 commit 4bdac21

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

articles/azure-cache-for-redis/cache-aspnet-output-cache-provider.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,30 +43,30 @@ The NuGet package downloads and adds the required assembly references and adds t
4343
</caching>
4444
```
4545

46-
Configure the attributes on the left with the values from your cache in the Microsoft Azure portal. Also, configure the other values you want. For instructions on accessing your cache properties, see [Configure Azure Cache for Redis settings](cache-configure.md#configure-azure-cache-for-redis-settings).
46+
Configure the attributes in the first c with the values from your cache in the Microsoft Azure portal. Also, configure the other values you want. For instructions on accessing your cache properties, see [Configure Azure Cache for Redis settings](cache-configure.md#configure-azure-cache-for-redis-settings).
4747

4848
| Attribute | Type | Default | Description |
4949
| --------- | ---- | ------- | ----------- |
5050
| *host* | string | "localhost" | The Redis server IP address or host name |
5151
| *port* | positive integer | 6379 (non-TLS/SSL)<br/>6380 (TLS/SSL) | Redis server port |
52-
| *accessKey* | string | "" | Redis server password when Redis authorization is enabled. The value is an empty string by default, which means the session state provider won’t use any password when it connects to Redis server. **If your Redis server is in a publicly accessible network like Azure Cache for Redis, be sure to enable Redis authorization to improve security, and provide a secure password.** |
52+
| *accessKey* | string | "" | Redis server password when Redis authorization is enabled. The value is an empty string by default, which means the session state provider doesn't use any password when it connects to Redis server. **If your Redis server is in a publicly accessible network like Azure Cache for Redis, be sure to enable Redis authorization to improve security, and provide a secure password.** |
5353
| *ssl* | boolean | **false** | Whether to connect to Redis server via TLS. This value is **false** by default because Redis doesn’t support TLS by default. **If you're using Azure Cache for Redis, which supports SSL by default, be sure to set this value to true to improve security.**<br/><br/>The non-TLS port is disabled by default for new caches. Specify **true** for this setting to use the non-TLS port. For more information about enabling the non-TLS port, see the [Access Ports](cache-configure.md#access-ports) section in the [Configure a cache](cache-configure.md) article. |
5454
| *databaseIdNumber* | positive integer | 0 | *This attribute can be specified only through either web.config or AppSettings.*<br/><br/>Specify which Redis database to use. |
5555
| *connectionTimeoutInMilliseconds* | positive integer | Provided by StackExchange.Redis | Used to set *ConnectTimeout* when creating StackExchange.Redis.ConnectionMultiplexer. |
5656
| *operationTimeoutInMilliseconds* | positive integer | Provided by StackExchange.Redis | Used to set *SyncTimeout* when creating StackExchange.Redis.ConnectionMultiplexer. |
5757
| *connectionString* (Valid StackExchange.Redis connection string) | string | *n/a* | Either a parameter reference to AppSettings or web.config, or else a valid StackExchange.Redis connection string. This attribute can provide values for *host*, *port*, *accessKey*, *ssl*, and other StackExchange.Redis attributes. For a closer look at *connectionString*, see [Setting connectionString](#setting-connectionstring) in the [Attribute notes](#attribute-notes) section. |
5858
| *settingsClassName*<br/>*settingsMethodName* | string<br/>string | *n/a* | *These attributes can be specified only through either web.config or AppSettings.*<br/><br/>Use these attributes to provide a connection string. *settingsClassName* should be an assembly qualified class name that contains the method specified by *settingsMethodName*.<br/><br/>The method specified by *settingsMethodName* should be public, static, and void (accepting no parameters), with a return type of **string**. This method returns the actual connection string. |
5959
| *loggingClassName*<br/>*loggingMethodName* | string<br/>string | *n/a* | *These attributes can be specified only through either web.config or AppSettings.*<br/><br/>Use these attributes to debug your application by providing logs from Session State/Output Cache along with logs from StackExchange.Redis. *loggingClassName* should be an assembly qualified class name that contains the method specified by *loggingMethodName*.<br/><br/>The method specified by *loggingMethodName* should be public, static, and void (accept no parameters), with a return type of **System.IO.TextWriter**. |
60-
| *applicationName* | string | The module name of the current process or "/" | *SessionStateProvider only*<br/>*This attribute can be specified only through either web.config or AppSettings.*<br/><br/>The app name prefix to use in Redis cache. The customer may use the same Redis cache for different purposes. To insure that the session keys don't collide, it can be prefixed with the application name. |
60+
| *applicationName* | string | The module name of the current process or "/" | *SessionStateProvider only*<br/>*This attribute can be specified only through either web.config or AppSettings.*<br/><br/>The app name prefix to use in Redis cache. The customer might use the same Redis cache for different purposes. To ensure that the session keys don't collide, it can be prefixed with the application name. |
6161
| *throwOnError* | boolean | true | *SessionStateProvider only*<br/>*This attribute can be specified only through either web.config or AppSettings.*<br/><br/>Whether to throw an exception when an error occurs.<br/><br/>For more about *throwOnError*, see [Notes on *throwOnError*](#notes-on-throwonerror) in the [Attribute notes](#attribute-notes) section. |
62-
| *retryTimeoutInMilliseconds* | positive integer | 5000 | *SessionStateProvider only*<br/>*This attribute can be specified only through either web.config or AppSettings.*<br/><br/>How long to retry when an operation fails. If this value is less than *operationTimeoutInMilliseconds*, the provider won't retry.<br/><br/>For more about *retryTimeoutInMilliseconds*, see [Notes on *retryTimeoutInMilliseconds*](#notes-on-retrytimeoutinmilliseconds) in the [Attribute notes](#attribute-notes) section. |
62+
| *retryTimeoutInMilliseconds* | positive integer | 5000 | *SessionStateProvider only*<br/>*This attribute can be specified only through either web.config or AppSettings.*<br/><br/>How long to retry when an operation fails. If this value is less than *operationTimeoutInMilliseconds*, the provider doesn't retry.<br/><br/>For more about *retryTimeoutInMilliseconds*, see [Notes on *retryTimeoutInMilliseconds*](#notes-on-retrytimeoutinmilliseconds) in the [Attribute notes](#attribute-notes) section. |
6363
| *redisSerializerType* | string | *n/a* | Specifies the assembly qualified type name of a class that implements Microsoft.Web.Redis. Serializer and that contains the custom logic to serialize and deserialize the values. For more information, see [About *redisSerializerType*](#about-redisserializertype) in the [Attribute notes](#attribute-notes) section. |
6464

6565
## Attribute notes
6666

6767
### Setting *connectionString*
6868

69-
The value of *connectionString* is used as key to fetch the actual connection string from AppSettings, if such a string exists in AppSettings. If not found inside AppSettings, the value of *connectionString* will be used as key to fetch actual connection string from the web.config **ConnectionString** section, if that section exists. If the connection string doesn't exist in AppSettings or the web.config **ConnectionString** section, the literal value of *connectionString* will be used as the connection string when creating StackExchange.Redis.ConnectionMultiplexer.
69+
The value of *connectionString* is used as key to fetch the actual connection string from AppSettings, if such a string exists in AppSettings. If not found inside AppSettings, the value of *connectionString* is used as key to fetch actual connection string from the web.config **ConnectionString** section, if that section exists. If the connection string doesn't exist in AppSettings or the web.config **ConnectionString** section, the literal value of *connectionString* is used as the connection string when creating StackExchange.Redis.ConnectionMultiplexer.
7070

7171
The following examples illustrate how *connectionString* is used.
7272

@@ -78,7 +78,7 @@ The following examples illustrate how *connectionString* is used.
7878
</connectionStrings>
7979
```
8080

81-
In `web.config`, use above key as parameter value instead of actual value.
81+
In `web.config`, use the key as parameter value instead of actual value.
8282

8383
```xml
8484
<sessionState mode="Custom" customProvider="MySessionStateStore">
@@ -98,7 +98,7 @@ In `web.config`, use above key as parameter value instead of actual value.
9898
</appSettings>
9999
```
100100

101-
In `web.config`, use above key as parameter value instead of actual value.
101+
In `web.config`, use the key as parameter value instead of actual value.
102102

103103
```xml
104104
<sessionState mode="Custom" customProvider="MySessionStateStore">
@@ -126,15 +126,15 @@ In `web.config`, use above key as parameter value instead of actual value.
126126

127127
Currently, if an error occurs during a session operation, the session state provider throws an exception. Throwing the exception shuts down the application.
128128

129-
This behavior has been modified in a way that supports the expectations of existing ASP.NET session state provider users while also allowing you to act on exceptions. The default behavior still throws an exception when an error occurs, consistent with other ASP.NET session state providers. Existing code should work the same as before.
129+
This behavior was modified in a way that supports the expectations of existing ASP.NET session state provider users while also allowing you to act on exceptions. The default behavior still throws an exception when an error occurs, consistent with other ASP.NET session state providers. Existing code should work the same as before.
130130

131131
If you set *throwOnError* to **false**, then instead of throwing an exception when an error occurs, it fails silently. To see if there was an error and, if so, discover what the exception was, check the static property *Microsoft.Web.Redis.RedisSessionStateProvider.LastException*.
132132

133133
### Notes on *retryTimeoutInMilliseconds*
134134

135135
The *retryTimeoutInMilliseconds* setting provides some logic to simplify the case where a session operation should retry on failure because of a network glitch or something else. The *retryTimeoutInMilliseconds* setting also allows you to control the retry timeout or to completely opt out of retry.
136136

137-
If you set *retryTimeoutInMilliseconds* to a number, for example 2000, when a session operation fails, it retries for 2000 milliseconds before treating it as an error. To have the session state provider apply this retry logic, just configure the timeout. The first retry will happen after 20 milliseconds, which is sufficient in most cases when a network glitch happens. After that, it will retry every second until it times out. Right after the time-out, it will retry one more time to make sure that it won’t cut off the timeout by (at most) one second.
137+
If you set *retryTimeoutInMilliseconds* to a number, for example 2000, when a session operation fails, it retries for 2,000 milliseconds before treating it as an error. To have the session state provider apply this retry logic, just configure the timeout. The first retry will happen after 20 milliseconds, which is sufficient in most cases when a network glitch happens. After that, it will retry every second until it times out. Right after the time-out, it will retry one more time to make sure that it won’t cut off the timeout by (at most) one second.
138138

139139
If you don’t think you need retry or if you want to handle the retry logic yourself, set *retryTimeoutInMilliseconds* to 0. For example, you might not want retry when you're running the Redis server on the same machine as your application.
140140

0 commit comments

Comments
 (0)