This article is a mirror article of machine translation, please click here to jump to the original article.

View: 17215|Reply: 0

[ASP.NET] About the asp.net OutputCache cache flushing disable setting

[Copy link]
Posted on 11/27/2018 1:44:41 PM | | | |
ASP.NET provides a convenient way to control the cache. The @OutputCache directive can be used to control the page output cache


  • Resource files such as css, js, image, and aspx can be read locally on the second visit without having to request the server side again, reducing the pressure on the client to request resources from the server and speeding up the client's response speed.
  • For frequently used data sources, store them in the data cache or in memory to reduce database requests and relieve database pressure.
  • Deploying websites on multiple computers and processing them in a distributed manner can effectively solve the pressure caused by multiple user requests on one server and speed up the response of client requests (distributed deployment).
  • Pages that will be frequently accessed but whose data is not updated can be treated statically, effectively reducing server pressure and client response speed.



Disable caching

My asp.net page OutputCache is configured as follows:


We need to disable the cache in the project development, otherwise, the page will not take effect after modification, in the past I have commented out this feature, in fact, there is a better solution,

Add the following configuration to the system.web node of web.config:

In the Web.Release.config file, configure it as follows:

asp.net mvc Web.Release.config uses detailed explanations
https://www.itsvse.com/thread-5185-1-1.html
(Source: Architect_Programmer)

In release mode, configuration items that disable caching are removed, which does not affect development or release.

Flush the cache

If we modify the data in the database, the page cannot be refreshed immediately, which greatly affects the user experience, in order not to affect the user experience, we can delete the cache and let the page reload, which is equivalent to refreshing the cache.

For example:

Testing perfection can flush the cache without affecting the cache of other pages.

Resources:The hyperlink login is visible.




Previous:Illustrated Dictionary of World Buddhist Art (20 volumes), PDF
Next:Share a book in English - Basic Principles of Drug Discovery and Development
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com