Exemple #1
0
        public string AddCacheBreakerToPath(string resourceUrl)
        {
            if (!ShouldBreakCache(resourceUrl))
            {
                return(resourceUrl);
            }

            var mapper     = _diskMappers.Single(m => m.CanHandle(resourceUrl));
            var pathToFile = mapper.Map(resourceUrl);
            var hash       = _hashProvider.ComputeMd5(pathToFile).ToBase64();

            return(resourceUrl + "?h=" + hash.Trim('='));
        }