Skip to content

Instantly share code, notes, and snippets.

@trnktms

trnktms/Startup.cs

Last active Nov 2, 2020
Embed
What would you like to do?
namespace Discovering.Sitecore10
{
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
...
// Sitecore output caching
services.AddSingleton<IOutputCacheService, OutputCacheService>();
services.Configure<OutputCacheOptions>(options => options.Enabled = true);
services.AddControllers();
...
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
app.UseEndpoints(endpoints =>
{
...
// Sitecore output caching
endpoints.MapControllerRoute(
"outputCache",
"api/outputcache/clear",
new { controller = "OutputCache", action = "Clear" }
);
...
});
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.