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);
}
}