Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including
Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Meta Stack Exchange is a question and answer site for meta-discussion of the Stack Exchange family of Q&A websites. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
12 years, 10 months ago
This question already has an answer here:
8 years ago.
I'm writing an ASP.NET MVC site where I'm running into a dilmena on how to set up proper caching. I'm trying to achieve something similar to how Stack Overflow works with caching, in that all pages are cached while:
Showing the username of the current user, as well as badges and reputation
Dynamically hiding/showing certain action links (e.g., the "edit" link on a question is only visible to some users)
How is this implemented?
I've tried looking through the SEDE code, but haven't found anything related to caching (probably because SEDE runs on Azure, so it's more complicated). One possible strategy that I can think of is
donut or substitution caching, but Phil Haack says that it's not recommended for ASP.NET MVC 2.
Aug 10, 2010 at 21:10
Maxim Zaslavsky Maxim Zaslavsky
5,504 4 4 gold badges 25 25 silver badges 33 33 bronze badges
We basically don't cache at all for logged in users, so that's your pivot point.
And remember, 90%+ of our traffic is from Google and almost all anonymous by definition..
Aug 10, 2010 at 21:20
Jeff Atwood Jeff Atwood
309k 106 106 gold badges 875 875 silver badges 1236 1236 bronze badges
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our
Accept all cookies
Necessary cookies only