Skip to content

Instantly share code, notes, and snippets.

@gabesumner
Created August 18, 2011 15:30
Show Gist options
  • Save gabesumner/1154325 to your computer and use it in GitHub Desktop.
Save gabesumner/1154325 to your computer and use it in GitHub Desktop.
Code to warm-up Sitefinity's Backend during Application Start
using System;
using Telerik.Sitefinity.Modules.Pages;
using Telerik.Sitefinity.Taxonomies;
using Telerik.Sitefinity.Modules.Blogs;
using Telerik.Sitefinity.Modules.Events;
using Telerik.Sitefinity.Modules.News;
using Telerik.Sitefinity.Modules.Libraries.BlobStorage;
using Telerik.Sitefinity.Modules.Libraries;
using Telerik.Sitefinity.Modules.Forms;
using Telerik.Sitefinity.Modules.Ecommerce.Catalog;
using Telerik.Sitefinity.Modules.Ecommerce.Orders;
using Telerik.Sitefinity.Abstractions;
using Telerik.Sitefinity.Workflow;
using Telerik.Sitefinity.Publishing;
using Telerik.Sitefinity.Data.ContentLinks;
using Telerik.Sitefinity.Modules.Ecommerce.Shipping;
using Telerik.Sitefinity.Modules.Newsletters;
using Telerik.Sitefinity.Modules.GenericContent;
using Telerik.Sitefinity.Security;
using Telerik.Sitefinity.Modules.Lists;
namespace SitefinityWebApp
{
public class Global : System.Web.HttpApplication
{
protected void Session_Start(object sender, EventArgs e)
{
if (!Bootstrapper.IsDataInitialized || Bootstrapper.IsAppRestarting)
return;
if (this.Application["SitefinityManagersInitialize"] == null)
{
PageManager.GetManager();
TaxonomyManager.GetManager();
BlogsManager.GetManager();
EventsManager.GetManager();
NewsManager.GetManager();
BlobStorageManager.GetManager();
LibrariesManager.GetManager();
FormsManager.GetManager();
CatalogManager.GetManager();
OrdersManager.GetManager();
ListsManager.GetManager();
UserProfileManager.GetManager();
ContentManager.GetManager();
NewslettersManager.GetManager();
ShippingManager.GetManager();
ContentLinksManager.GetManager();
PublishingManager.GetManager();
WorkflowManager.GetManager();
this.Application["SitefinityManagersInitialize"] = "true";
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment