ASP.NET Core - difference between Output caching and Response caching

Viewed 155

ASP.NET Core 7 preview 6 just introduced Output caching which caches the endpoint output. However ASP.NET already has Response caching which seems to already provide the same feature.
What is the difference between the two and when should one be used and when should the other be used?

1 Answers

I haven't watch the video CodingMytra provided. But I think Output caching has some enhancements over Response caching. For example, you can specify a few seconds of caching.

I found a useful video, and it has some demos you learn more about the Output caching in .Net7. I think you can find the difference in this video.

We can find out why there is a need for Output caching in this github issue.

Link : Add support for Output Caching #27387

Related