public JavaScriptResult ServerVariables() { var serverVars = new BackOfficeServerVariables(Url, _runtimeState, _features, GlobalSettings); //cache the result if debugging is disabled var result = HttpContext.IsDebuggingEnabled ? ServerVariablesParser.Parse(serverVars.GetServerVariables()) : AppCaches.RuntimeCache.GetCacheItem <string>( typeof(BackOfficeController) + "ServerVariables", () => ServerVariablesParser.Parse(serverVars.GetServerVariables()), new TimeSpan(0, 10, 0)); return(JavaScript(result)); }
public JavaScriptResult ServerVariables() { var serverVars = new BackOfficeServerVariables(Url, ApplicationContext, UmbracoConfig.For.UmbracoSettings()); //cache the result if debugging is disabled var result = HttpContext.IsDebuggingEnabled ? ServerVariablesParser.Parse(serverVars.GetServerVariables()) : ApplicationContext.ApplicationCache.RuntimeCache.GetCacheItem <string>( typeof(BackOfficeController) + "ServerVariables", () => ServerVariablesParser.Parse(serverVars.GetServerVariables()), new TimeSpan(0, 10, 0)); return(JavaScript(result)); }