Shazwazza / ClientDependency

DEPRECATED. A library for managing CSS & JavaScript dependencies and optimization in ASP.Net
139 stars 65 forks source link

Issue with external outputcache #113

Open ZNS opened 7 years ago

ZNS commented 7 years ago

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 commented 7 years ago

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.

samgooch commented 3 years ago

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?