Created
August 18, 2011 15:30
-
-
Save gabesumner/1154325 to your computer and use it in GitHub Desktop.
Code to warm-up Sitefinity's Backend during Application Start
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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