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

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?
 
S

Showjumper

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...
 
K

Kevin Spencer

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.
 
S

Showjumper

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top