Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Caching of Session object at control level..

Status
Not open for further replies.

ronaldr

Programmer
May 22, 2002
10
0
0
US
I am storing an object in the Session, but when I go to access it from a control I get a cached copy of the object. I know this because I have a timestamp within the object, and the object access from within the control (from Page.Session, Context.Session, or HttpContext.Current.Session) has an older timestamp than the object I am utilizing at the page level. This cached copy is refreshed every two minutes, but this is not good enough for my application.

Is this a configurable option, or is there some other way to grab the latest session collection from somewhere that I haven't listed here?
 
Okay, I'm stupid. I was checking through the control's ascx page and this was at the top:

<%@ OutputCache Duration=&quot;120&quot; VaryByParam=&quot;none&quot; %>

This causes the control itself to be cached, which is fine if the control is static but in my case it was dynamic. Anyway, this is what you get for using someone else's code without looking at it first :p.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top