madskristensen / WebEssentials.AspNetCore.OutputCaching

Other
52 stars 17 forks source link

Question - How does this differ from ResponseCaching? #15

Closed awright18 closed 3 years ago

awright18 commented 5 years ago

What about https://github.com/aspnet/AspNetCore/tree/master/src/Middleware/ResponseCaching From what I've read they want to make this a bit more configurable. Is there a reason I might want to use your output caching instead of ResponseCaching?

jodydonetti commented 5 years ago

ResponseCaching set some HTTP headers, telling proxies/clients how they should cache the response.

This instead, on top of doing the same thing, also caches the response in the server (memory) itself, so that even if clients force-request the page on the server bypassing HTTP cache-related headers or if other clients will make the same request, the server will not re-process the request again, instead giving immediately the same response already cached before.

Hope @madskristensen agrees with this explanation 😅

jodydonetti commented 3 years ago

@madskristensen if you are into spring cleaning I think this can be closed.