/// <summary> /// Builds a composite resource and caches it /// </summary> /// <param name="scripts">list of script to compress together</param> /// <param name="Name">Name, key in cache</param> /// <param name="type">type of scripts css, js</param> /// <param name="context">current http context</param> private static void BuildCompositeResource(List <string> scripts, string Name, ResourceType type, HttpContextBase context) { //only cache the resource if it doesn't exist in the cache if (!ResourceCache.ExistsInCache(Name, context)) { ResourceBuilder resourcebuilder = new ResourceBuilder(context); string resouce = resourcebuilder.CreateCompositeResource(scripts, type); ResourceCache.CacheResource(Name, resouce, context); } }