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

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

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

    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?


    Showjumper Guest

  2. Similar Questions and Discussions

    1. global.asax
      Hi all! I've created a simple aspx application and when I run it locally on my pc all works fine. If I move it on the web server I get the...
    2. global.asax problem
      Hi all! I've created a simple aspx application and when I run it locally on my pc all works fine. If I move it on the web server I get the...
    3. Global Error handling in Applicatio_Error() of Global.asax
      Hi all, For a web application if we are using web farm, and if i want to do Global Error handling can i use Applicatio_Error() method in...
    4. What is Global.asax?
      It's the class file definition code for the Session and Application events - if you have anything that should be done when a user first connects or...
    5. Global ASAX error
      Sounds like references have been removed from your web.config file. Look in your web.config file under...
  3. #2

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

    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...
    "Kevin Spencer" <kevin@SPAMMERSSUCKtakempis.com> wrote in message
    news:uFTacT8PDHA.2768@tk2msftngp13.phx.gbl...
    > Are you referring to the Application Cache? What do you mean by
    "override?"
    > You can certainly access and use the Application Cache from any ASPX page
    in
    > your web.
    >
    > HTH,
    >
    > Kevin Spencer
    > Microsoft FrontPage MVP
    > Internet Developer
    > [url]http://www.takempis.com[/url]
    > Big things are made up of
    > lots of Little things.
    >
    > "Showjumper" <showjump@bellsouth.net> wrote in message
    > news:OwUbMV1PDHA.452@TK2MSFTNGP11.phx.gbl...
    > > 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?
    > >
    > >
    >
    >

    Showjumper Guest

  4. #3

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

    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
    [url]http://www.takempis.com[/url]
    Big things are made up of
    lots of Little things.

    "Showjumper" <shojumper@grkjashdjkf.com> wrote in message
    news:%23anpPz8PDHA.1748@TK2MSFTNGP11.phx.gbl...
    > 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...
    > "Kevin Spencer" <kevin@SPAMMERSSUCKtakempis.com> wrote in message
    > news:uFTacT8PDHA.2768@tk2msftngp13.phx.gbl...
    > > Are you referring to the Application Cache? What do you mean by
    > "override?"
    > > You can certainly access and use the Application Cache from any ASPX
    page
    > in
    > > your web.
    > >
    > > HTH,
    > >
    > > Kevin Spencer
    > > Microsoft FrontPage MVP
    > > Internet Developer
    > > [url]http://www.takempis.com[/url]
    > > Big things are made up of
    > > lots of Little things.
    > >
    > > "Showjumper" <showjump@bellsouth.net> wrote in message
    > > news:OwUbMV1PDHA.452@TK2MSFTNGP11.phx.gbl...
    > > > 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?
    > > >
    > > >
    > >
    > >
    >
    >

    Kevin Spencer Guest

  5. #4

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

    Thank you for that. I understand now...
    "Kevin Spencer" <kevin@SPAMMERSSUCKtakempis.com> wrote in message
    news:e5lRse9PDHA.2676@TK2MSFTNGP10.phx.gbl...
    > 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
    > [url]http://www.takempis.com[/url]
    > Big things are made up of
    > lots of Little things.
    >
    > "Showjumper" <shojumper@grkjashdjkf.com> wrote in message
    > news:%23anpPz8PDHA.1748@TK2MSFTNGP11.phx.gbl...
    > > 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...
    > > "Kevin Spencer" <kevin@SPAMMERSSUCKtakempis.com> wrote in message
    > > news:uFTacT8PDHA.2768@tk2msftngp13.phx.gbl...
    > > > Are you referring to the Application Cache? What do you mean by
    > > "override?"
    > > > You can certainly access and use the Application Cache from any ASPX
    > page
    > > in
    > > > your web.
    > > >
    > > > HTH,
    > > >
    > > > Kevin Spencer
    > > > Microsoft FrontPage MVP
    > > > Internet Developer
    > > > [url]http://www.takempis.com[/url]
    > > > Big things are made up of
    > > > lots of Little things.
    > > >
    > > > "Showjumper" <showjump@bellsouth.net> wrote in message
    > > > news:OwUbMV1PDHA.452@TK2MSFTNGP11.phx.gbl...
    > > > > 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?
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >
    >

    Showjumper Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139