BlueCollar.Dashboard.Index.GetTemplatesHtml C# (CSharp) Method

GetTemplatesHtml() private static method

Gets the templates HTML as a string.
private static GetTemplatesHtml ( ) : string
return string
        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;
        }