As long as it is possible, the cache data and page output

xiaoxiao2021-03-06  78

ASP.NET provides some simple mechanisms that cache these page output or data without requiring dynamic calculation page output or data for each page. In addition, the performance of these pages can be optimized by designing the cached pages and data requests to be cached (especially the area where the volume is expected to be larger in the site). Compared with any Web Forms for .NET Framework, properly use the cache can better improve the performance of the site, sometimes this increase is superior.

There are two points to pay attention to using the ASP.NET cache mechanism. First, don't cache too much. Cache is overhead, especially in memory use. Do not cache items that are easy to recalculate and rarely used. Second, the validity period given to the cache is not too short. Items that have expired will result in unnecessary turnover in the cache and often lead to more code clearance and garbage collection. If you are concerned about this issue, monitor the Cache Total Turnover Rate Performance Counter associated with the ASP.NET Applications Performance Object. High turnover rates may explain that there is a problem, especially when the item is removed before expire. This is also called memory pressure.

For information on how to cache page output and data request, see the ASP.NET cache function.

转载请注明原文地址:https://www.9cbs.com/read-101630.html

New Post(0)