private void UpdateCacheFallback(HttpContext context, String fallbackUrl, String filePath) { var imageCacheItem = GetFromCache(context); if (imageCacheItem == null) { imageCacheItem = new ImageCacheModel(); } imageCacheItem.FallbackImage = fallbackUrl; context.Cache.Insert(context.Request.Url.AbsoluteUri.ToLower(), imageCacheItem, new CacheDependency(filePath)); }
private void UpdateCacheContent(HttpContext context, byte[] content, String filePath) { var imageCacheItem = GetFromCache(context); if (imageCacheItem == null) { imageCacheItem = new ImageCacheModel(); } imageCacheItem.WebpContent = content; context.Cache.Insert(context.Request.Url.AbsoluteUri.ToLower(), imageCacheItem, new CacheDependency(filePath)); }