CACHING PROBLEM

Last post 08-29-2008 6:02 PM by liammcmullen. 3 replies.

Sort Posts:

  • CACHING PROBLEM

    08-29-2008, 4:16 PM
    • Member
      615 point Member
    • newbie06
    • Member since 04-14-2006, 5:28 PM
    • Posts 437

    CACHING PROBLEM

    I have a page that is cached; the page has a hidden link that can only be seen when the user logs in. Let’s say the user comes to the page, the page gets cached, then the user decides to log in and goes to the login page. After the login the user is redirected to the page he was on. What he sees is the cached page without the hidden link. How can I cache this page but serve a fresh page after the user logs in so that the user can see the hidden link which only logged in users can see.

    Any ideas?

    newbie

     

  • Re: CACHING PROBLEM

    08-29-2008, 4:31 PM
    • Contributor
      2,038 point Contributor
    • liammcmullen
    • Member since 03-24-2008, 11:31 AM
    • Belfast
    • Posts 352

    if you issue a

    Response.Expires = 0

    the cached page wil be forced to refresh.

     

     

    Liam Mcmullen
  • Re: CACHING PROBLEM

    08-29-2008, 5:01 PM
    • Member
      615 point Member
    • newbie06
    • Member since 04-14-2006, 5:28 PM
    • Posts 437

    Thank you for your answer. Now I want the page to be cached but after a user logs in I need to refresh the page, where would I put the Response.Expires = 0 code. In the page load but that would mean it would fire everytime a user comes to the page. Can you explain it a little more, thanks, newbie

  • Re: CACHING PROBLEM

    08-29-2008, 6:02 PM
    Answer
    • Contributor
      2,038 point Contributor
    • liammcmullen
    • Member since 03-24-2008, 11:31 AM
    • Belfast
    • Posts 352

    I would avoid caching pages that handle authentication, it could result in somebodys username/password being cached and then presented to another user. if you keep these pages small they will work fine and not need caching.

     

    Liam Mcmullen
Page 1 of 1 (4 items)