The cache for ASP. NET is divided into 3 types:
The first type: page Caching
Just add at the top of the page: <% @OutputCache duration= ' varybypara= ' None '%>
Druation: Cache time, 60 seconds
Varybypara: parameter, whether based on the parameter cache
Discacheenable= ' True|false ': Cache is saved on disk
The second type: data cache :
1.ie cache: When a customer browses a page, IE automatically generates a page in the temporary file, so when the page data is modified, the data is again accessed from the previous
At this point there are 2 solutions, the first is the ie--internet option-General---Internet cache files-every time you visit a webpage, the latest version
But this approach needs to be set up by the customer, not the best solution;
The second solution is to add this sentence to the page load event:
Context.Response.Cache.SetCacheability (httpcacheability.nocache); Can
In this way, there are no pages in the temporary Internet files, but if the page has a picture or JS file, it will be downloaded to the temporary Internet file.
ShowModalDialog () function in 2.JS disables page caching when an ASPX page is opened
Workaround:
Load plus response.expires =-1, meaning that the page immediately expires;
The third type: data source Caching :
data Source: cacheexpirationpolicy= "Sliding"
Using the "swipe" window to cache, assuming that the cache time is 10 minutes, then from someone access start 10 minutes cache, as long as someone access, 10 minutes from the moment of access, and so on, can be unlimited cache down
ASP. NET Cache