Implemented Response Cashing
This commit is contained in:
@ -36,6 +36,8 @@ namespace H_Plus_Sports
|
||||
services.AddScoped<IProductRepository, ProductRepository>();
|
||||
services.AddScoped<ISalespersonRepository, SalespersonRepository>();
|
||||
|
||||
services.AddResponseCaching();
|
||||
|
||||
services.AddMvc(option => option.EnableEndpointRouting = false)
|
||||
.SetCompatibilityVersion(CompatibilityVersion.Version_3_0)
|
||||
.AddNewtonsoftJson(opt => opt.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore);
|
||||
@ -53,6 +55,8 @@ namespace H_Plus_Sports
|
||||
app.UseDeveloperExceptionPage();
|
||||
}
|
||||
|
||||
app.UseResponseCaching();
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
|
||||
app.UseRouting();
|
||||
|
||||
Reference in New Issue
Block a user