If i use the cache class in the global asax, can overrride it for an indiv. page

  • Thread starter Thread starter Showjumper
  • Start date Start date
S

Showjumper

If i use the cache class in the global asax file in the session sub, can i
override for an individual page that has content that will be changing more
frequently than the rest of the site? Would i use a dependency in this case?
Is there any downside to inseting the cache code in the session start sub?
 
If i use the HTTPCachePolicy Class in the global asax, does that make all
the pages in the app cached? A couple of pages in the app would need their
content refreshed more often so could i alter the caching in the codebehind
just for those 2 pages? Is there a disadvantage to usiong the the cache
policy class in the global asax? I hopei have explained it better...
 
If you're referring to Response.Cache, which is of the type HTTPCachePolicy,
your code is scoped to the current Response, which means that it is not set
globally no matter where you use it. The Session_OnStart Sub fires only when
the first ASPX page is requested by a user. Therefore, it only affects that
page.

HTH,

Kevin Spencer
Microsoft FrontPage MVP
Internet Developer
http://www.takempis.com
Big things are made up of
lots of Little things.
 
Thank you for that. I understand now...
Kevin Spencer said:
If you're referring to Response.Cache, which is of the type HTTPCachePolicy,
your code is scoped to the current Response, which means that it is not set
globally no matter where you use it. The Session_OnStart Sub fires only when
the first ASPX page is requested by a user. Therefore, it only affects that
page.

HTH,

Kevin Spencer
Microsoft FrontPage MVP
Internet Developer
http://www.takempis.com
Big things are made up of
lots of Little things.
 
Back
Top