Two additional middleware components were released with ASP.NET Core 1.1, one for response caching and the other for response compression.
- [Instructor] Two additional middleware components…in 1.1 are used for response caching…and response compression.…Let's look at response caching first.…It requires the Microsoft.AspNetCore.Response…caching package, and its usage is very simple.…Add services.AddResponseCaching…in ConfigureServices,…and there are some options available,…add app.UseResponseCaching in the configure method,…and those are both of course in the startup class,…and then use the ResponseCache controller attribute.…
The three options available to set…are UseCaseSensitivePaths, and that defaults to false,…the MaximumBodySize, and it defauts to 64 megabytes,…and the SizeLimit for the cache,…and that defaults to 100 megabytes.…There is a slight modification in 2.0…and that is where you can configure…the response cache in middleware.…So let's look at this in code.…So I am in the startup class…in the ConfigureServices method,…and on like 66 I'm adding response caching…with the default options set.…
I have an example here…of how you would customize it if you so choose.…
- Running and debugging ASP.NET Core applications
- Pros and cons of migrating existing applications to ASP.NET Core.
- Built-in dependency injection
- Environment awareness and app configuration
- Web host configuration and SSL
- View components invoked as tag helpers
- Configuration and logging
- Using Razor Pages
Skill Level Intermediate
Set up the sample projects4m 49s
1. Get to Know .NET Core
2. ASP.NET Core 1.0
3. ASP.NET Core 1.1
4. ASP.NET Core 2.0
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.