Quantcast
Channel: bundletransformer Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 698

Edited Feature: AssetHandlerBase improperly caching in multitenant site [120]

$
0
0
In a multi-tenant site I have a VirtualPathProvider registered with the HostingEnvironment. The VirtualPathProvider allows virtual files from one of many customer databases to maps to ~/Content/Customer/[xyz.less] based on the host the file is being accessed from. In AssetHandlerBase.GetCacheKey, you are not honoring any custom GetCacheKey implementation that might be available via _virtualFileSystemWrapper.GetCacheKey (and therefore VirtualPathProvider) and this is causing items cached from one host to be crossed over to different hosts.

I propose updating the default implementation of AssetHandlerBase.GetCacheKey from
```
string key = string.Format(Constants.Common.ProcessedAssetContentCacheItemKeyPattern, processedAssetVirtualPath.ToLowerInvariant());
```
to
```
string key = string.Format(Constants.Common.ProcessedAssetContentCacheItemKeyPattern, _virtualFileSystemWrapper.GetCacheKey(assetVirtualPath) ?? processedAssetVirtualPath.ToLowerInvariant());
```

Viewing all articles
Browse latest Browse all 698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>