Does HttpCacheability.Public set page caching on the server?

I have these lines in my global.asax (mainly because Can I add my caching lines to global.asax? )

Now I want to understand if this code is purely adding HTTP headers to the page, or does it also .Net cache this page on the server for 300 seconds?

Response.Cache.SetExpires(DateTime.Now.AddSeconds(300));
Response.Cache.SetCacheability(HttpCacheability.Public);
+3
source share
1 answer

Your page will also be stored in the output cache. Are you sure you want to do this for every page of the site?

KB article

+1
source

Source: https://habr.com/ru/post/1738366/


All Articles