Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET Caching Problem

ASP.NET Caching Problem

Scheduled Pinned Locked Moved Web Development
csharpasp-netdebugginghelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Brady Kelly
    wrote on last edited by
    #1

    Excuse my ignorance, but as a fairly newbie ASP.NET debugger, the caching is driving me insane. At seemingly random times, my changes just are not affected. I've even set Response.Expires to 0, but the old page before this is still being rendered. I can't delete the temporary files because it says they're in use, and it really seems too much effort to go and do this all the time. What am I missing to end this trial?

    T 1 Reply Last reply
    0
    • B Brady Kelly

      Excuse my ignorance, but as a fairly newbie ASP.NET debugger, the caching is driving me insane. At seemingly random times, my changes just are not affected. I've even set Response.Expires to 0, but the old page before this is still being rendered. I can't delete the temporary files because it says they're in use, and it really seems too much effort to go and do this all the time. What am I missing to end this trial?

      T Offline
      T Offline
      Torsten Mauz
      wrote on last edited by
      #2

      To be honest it is more likely to be your browser caching things. Unless you have some cache directives used, then afaik asp.net will not cache your page. Try the following:

      Response.CacheControl = "no-cache";
      Response.AddHeader("Pragma", "no-cache");
      Response.Expires = -1;

      But you could also add the following to the top of your aspx file:

      <%@ OutputCache Location="None" VaryByParam="None" %>

      Or you can achieve this programatically by doing:

      Response.Cache.SetCacheability(HttpCacheability.NoCache);

      HTH

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups