Moves cache initialization the the request middleware
This commit is contained in:
@@ -37,7 +37,6 @@ namespace Umbraco.Extensions
|
||||
// We need to add this before UseRouting so that the UmbracoContext and other middlewares are executed
|
||||
// before endpoint routing middleware.
|
||||
app.UseUmbracoRouting();
|
||||
app.UseUmbracoContentCache();
|
||||
|
||||
app.UseStatusCodePages();
|
||||
|
||||
@@ -178,18 +177,6 @@ namespace Umbraco.Extensions
|
||||
return app;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enables the Umbraco content cache
|
||||
/// </summary>
|
||||
public static IApplicationBuilder UseUmbracoContentCache(this IApplicationBuilder app)
|
||||
{
|
||||
// TODO: This should install middleware to initialize instead of eagerly doing the initialize here
|
||||
|
||||
PublishedSnapshotServiceEventHandler publishedContentEvents = app.ApplicationServices.GetRequiredService<PublishedSnapshotServiceEventHandler>();
|
||||
publishedContentEvents.Start();
|
||||
return app;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ensures the runtime is shutdown when the application is shutting down
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user