I have installed the nuget package Microsoft.Web.RedisOutputCacheProvider
for use with Azure Web App running on multiple server instances following the instructions here https://msdn.microsoft.com/en-us/library/azure/dn798898.aspx and are receiving the following error:
When using a custom output cache provider like 'MyRedisOutputCache', only the following expiration policies and cache features are supported: file dependencies, absolute expirations, static validation callbacks and static substitution callbacks.
The configuration setting is as follows:
<system.web>
<caching>
<outputCache defaultProvider="MyRedisOutputCache">
<providers>
<add name="MyRedisOutputCache"
type="Microsoft.Web.Redis.RedisOutputCacheProvider"
port="1234"
host="[my host]"
accessKey="[my access key]"
ssl="true" />
</providers>
</outputCache>
</caching>
</system.web>
I've tried setting the connectionString
to a valid StackExchange.Redis connection string instead of setting the individual port/host etc... but still receive the same error.
We also have the Microsoft.Web.RedisSessionStateProvider
running in the same web app using the same settings with no issues.
Any help would be appreciated.
Using the RedisOutputCacheProvider with secured controller actions which employ some flavor of the AuthorizeAttribute appear to be causing the exception. It works fine for AllowAnonymous actions. The below may help:
Why can't I combine [Authorize] and [OutputCache] attributes when using Azure cache (.NET MVC3 app)?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With