Ext.Net.HandlerMethods.PutToCache C# (CSharp) Method

PutToCache() private static method

private static PutToCache ( string path, HttpContext context, string cacheKey, HandlerMethods handlerMethods ) : void
path string
context System.Web.HttpContext
cacheKey string
handlerMethods HandlerMethods
return void
        private static void PutToCache(string path, HttpContext context, string cacheKey, HandlerMethods handlerMethods)
        {
            BuildDependencySet dependencySet = BuildManager.GetCachedBuildDependencySet(context, path);

            if (dependencySet != null)
            {
                IEnumerable virtualPaths = dependencySet.VirtualPaths;

                if (virtualPaths != null)
                {
                    List<string> paths = new List<string>();

                    foreach (string _path in virtualPaths)
                    {
                        paths.Add(context.Server.MapPath(_path));
                    }
                    context.Cache.Insert(cacheKey, handlerMethods, new CacheDependency(paths.ToArray()));
                    return;
                }
            }

            context.Cache.Insert(cacheKey, handlerMethods);
        }
    }