ASP.NET Page Level Caching (with Authenticated Sites)

As far as I understand, page-level caching does not take into account that for authenticated sites different users can request the same page (URL), while the displayed page itself is different (because it contains user-specific data),

If you do not enable cookieless authentication (then sessionID becomes part of the URL), all users will see the same page in the cache (no matter who they are).

Is it correct?

+5
source share
4 answers

Yes, you are 100% correct on this.

, , .

, , .

+4

, , Substitution .

(, , , , Page_Load .., ), .

<asp:Substitution ID="mySubstitution" runat="server" MethodName="GetLoggeninUserName" />
+3

"Donut Caching", :

" " ASP.NET 2.0

, "" .

+3

Yes, you are right, and the substitution control noted by Andy (and Zhafi) is your best answer if you are using ASP.NET 2.0 or higher. Creating separate user controls for non-user-specific content is a less than ideal approach that should only be used if you're stuck with ASP.NET v1.x (so you should mark Andy as the answer, I I would have thought).

0
source

All Articles