ASP.NET buffer processing

zhaozj2021-02-11  188

Caching OverviewCaching is a technique that is widely used in computing to increase performance by keeping frequently accessed or expensive data in memory. In the context of a Web application, caching is used to hold onto pages or data across HTTP requests and reuse them without the expense Of reviewing them.

ASP.NET HAS TWO KINDS OF CACHING THAT CAN be Utilized by Web Applications.

Caching the dynamic response generated by a request is known as Output Caching. The caching of arbitrary objects programmatically is known as Data Caching. To support this, ASP.NET provides a full featured Cache engine that allows programmers to easily hold onto data across requests.

Output caching is useful when the contents of an entire page can be cached. On a heavily accessed site, caching frequently accessed pages for even a minute at a time can result in substantial throughput gains. While a page is cached by the output cache, subsequent Requests for That Page Without Executing The code That create

Sometimes it's not practical to cache an entire page - perhaps portions of the page must be created or customized for each request In this case, it's oftentimes worthwhile to identify objects or data that are expensive to construct that are eligible for caching Once these.. Items Are Identified, They Can Be CREATED AND THEN CACHED for Some Period of Time.

Choosing the time to cache an item can make for an interesting decision. For some items, the data might be refreshed at regular intervals or the data is valid for a certain amount of time. In that case, the cache item can be given an expiration policy that will cause them to be removed from the cache when they're expired. Code that accesses the cache item simply checks for the absence of the item, and recreates it if necessary.The ASP.NET cache supports file and cache key dependencies, Allowing Developers To make a cache it or another cache it item. this technique can be used to invalidate items when their underlying data source change

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

New Post(0)