Cache home page for non-authenticated users in ASP.NET MVC 3
问题 My website have a home page, and I would like to cache that page for anonymous users, and set it as "private" for authenticated users (so they save it on their computers, nowhere else). So, if the user is anonymous I want to save the page in the server cache, and also in the browser cache using Cache-control:public, max-age=60 and Vary:Cookie , so if the browser gets authenticated and send a cookie, the browser won't reuse the former stored page. If the user is authenticated, then I do not