How not cache an ASP.NET user control?

后端 未结 3 1978
無奈伤痛
無奈伤痛 2021-01-02 23:15

I\'m using OutputCache in my page that has a user control, but I don\'t want to cache this specific user control because it\'s related to a user login (if I access the page,

3条回答
  •  情深已故
    2021-01-02 23:56

    You can create a cache filter : http://weblogs.asp.net/rashid/archive/2008/03/28/asp-net-mvc-action-filter-caching-and-compression.aspx

    Check inside this filter if the user is logged or not.

提交回复
热议问题