ScaleOut’s ASP.NET output cache provider is a custom, out-of-process provider that can be enabled by modifying your application’s
web.config
file. This provider can be used in web applications that target the .NET 4.0 runtime and higher.
Like WSAF Caching’s output cache provider, you enable this custom provider by adding it under your <outputCache>
element’s <providers>
section. Once added, simply change the defaultProvider
attribute to point to the new "SossOutputCacheProvider"
:
<caching> <outputCache defaultProvider="SossOutputCacheProvider"> <providers> <add name="SossOutputCacheProvider" type="Soss.Web.SossOutputCacheProvider, soss_storeprovider, Version=5.0.0.0, Culture=neutral, PublicKeyToken=a1ec0b86f746a476" throwOnError="false" sossAccessTimeoutMilliseconds="250" /> </providers> </outputCache> </caching>
In addition to the standard name
and type
attributes, the provider supports several custom attributes that give you fine-grained control over how the provider should
behave in situations when you application is unable to communicate with the ScaleOut data grid:
-
throwOnError
-
If an error occurs when accessing the ScaleOut StateServer service (for example, if a network problem prevents a web server
from accessing the ScaleOut data grid), the
throwOnError
attribute controls whether exceptions are thrown from the provider—if exceptions are suppressed, the provider will inform ASP.NET pipeline that the requested output cache entry does not exist. The resulting "cache miss" will cause ASP.NET to execute the full request handler instead. -
sossAccessTimeoutMilliseconds
-
The
sossAccessTimeoutMilliseconds
attribute specifies the maximum time (in milliseconds) that the Output Cache Provider will wait to receive a response from the ScaleOut data grid. If the timeout is elapsed, the provider will simply inform the ASP.NET pipeline that the output cache entry does not exist, and the resulting "cache miss" will cause ASP.NET to execute the full request handler instead. A value of0
will cause the provider to wait indefinitely, causing the web request to be always wait until a result is returned.
More information about output cache configuration is available in the ASP.NET Output Cache Provider topic of the ScaleOut StateServer Help online guide.