ClientDependency icon indicating copy to clipboard operation
ClientDependency copied to clipboard

Issue with external outputcache

Open ZNS opened this issue 9 years ago • 2 comments

Hi,

I've implemented outputcaching using redis for umbraco, by writing my own OutputCacheProvider. However I get an exception with client dependency when running multiple sites that share the same redis store. One site tries to access the other sites app_data\clientdependency folder.

ZNS avatar Feb 15 '17 17:02 ZNS

It seems a workaround for this is to override the getoutputcacheprovidername method.

public override string GetOutputCacheProviderName(HttpContext context)
{
    if (context.Request.Url.AbsolutePath.Equals("/umbraco/dependencyhandler.axd", StringComparison.InvariantCultureIgnoreCase))
    {
        return "AspNetInternalProvider";
    }
    return base.GetOutputCacheProviderName(context);
}

It would be nice if this could be solved within the library itself though.

ZNS avatar Feb 15 '17 20:02 ZNS

Hi @ZNS - I'm too facing this issue now with Umbraco 8.10.1 and using Azure Redis Cache. The above doesn't seem to work for me. I'm seeing Object Reference errors around the provider (is my guess). Have you had to do anything for newer versions of Umbraco?

samgooch avatar Jan 18 '21 17:01 samgooch