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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GetVaryByCustomString and Request events

Status
Not open for further replies.

icrf

Programmer
Joined
Dec 4, 2001
Messages
1,300
Location
US
I'm trying to use custom output caching based on a Session variable in Global.GetVaryByCustomString. The problem arises when the Session times out and the user requests a page. I check a cookie and attempt to reset the Session variable if the Session is not set (a default value is set if the data in the cookie is bad or non-existant).

My problems is that I need to run this check/reset code before GetVaryByCustomString is called, but it has to be called after the Session object has been loaded. It needs to run on every request in the application, but not every page is going to be cached. Is there an event or function in HttpApplication that gets called at this time?

Going from lists like this, it looks like caching gets handled at ResolveRequestCache, which runs just before AcquireRequestState, which loads Session. Is what I'm attempting to do not possible?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top