void OnLoadRequestedPath(HttpApplication app, string sprocketPath, string[] pathSections, HandleFlag handled)
        {
            if (handled.Handled)
            {
                return;
            }

            if (!File.Exists(WebUtility.MapPath(PageRegistry.XmlFilePath)))
            {
                return;
            }

            switch (sprocketPath)
            {
            case "$reset":
                PageRegistry.UpdateValues();
                TemplateRegistry.Reload();
                ListRegistry.Reload();
                OutputFormatRegistry.Reload();
                GeneralRegistry.Reload();
                ContentCache.ClearCache();
                WebUtility.Redirect("");
                break;

            default:
                PageRegistry.CheckDate();

                PageEntry page = PageRegistry.Pages.FromPath(sprocketPath);
                if (page == null)
                {
                    return;
                }
                if (OnBeforeRenderPage != null)
                {
                    OnBeforeRenderPage(page, sprocketPath, pathSections);
                }
                string output = page.Render();
                if (output == null)
                {
                    return;
                }
                Response.Write(output);
                break;
            }

            handled.Set();
        }
 public static void Reload()
 {
     instance = new TemplateRegistry();
 }
 public static void Reload()
 {
     instance = new TemplateRegistry();
 }