/// <summary> /// Gets the templates HTML as a string. /// </summary> /// <returns>The templates HTML as a string.</returns> private static string GetTemplatesHtml() { const string Key = "BlueCollar.Dashboard.Index.Templates"; string templates = HttpRuntime.Cache[Key] as string; if (string.IsNullOrEmpty(templates)) { templates = StaticFile.GetContentsAsString("BlueCollar.Dashboard.Static.templates.html"); HttpRuntime.Cache.Add( Key, templates, null, Cache.NoAbsoluteExpiration, Cache.NoSlidingExpiration, CacheItemPriority.Normal, null); } return(templates); }