This example describes the ASP.net cache processing class. Share to everyone for your reference. Specifically as follows:asp.net cache processing class.
Usage:
Just Copy this code into a new class file (. cs) and add it to your ASP. NET website.
ASP. NET 2.0 retains all the caching functions of ASP. NET 1.1. It also adds new functions and enhances existing functions. The new features include cache configuration files, custom cache dependencies, SQL cache dependencies, and creating dynamic
This is on the CSDN Forum: topic.csdn.netu200807021525afa2ea-c59f-427f-add4-a7528b5302d0.html? 27627. I think it's good. I 've collected data layer performance skills. 1. Return multiple result sets. 2. Paging data access skills. 3. connection pool
Original article address:
Http://www.microsoft.com/china/msdn/library/webservices/asp.net/us0501ASPNETPerformance.mspx? MFR = true
Content on this page
Data Layer Performance
Tip 1: Return multiple result sets
Helper Class CodeusingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingsystem.web;usingSystem.Web.Caching;namespacebusinessrules.common{/// ///Cache Height Caching/// Public classCacheManager {#region--property--Private Static
When it comes to asp.net caching, that is: cache as early as possible; you should cache at every level of your application. Add caching support to the data tier, business logic tier, UI, or output layer. Memory is now very cheap-therefore, a great
Cache as early as possible; cache should be implemented at every layer of the application. Add cache support to the data layer, business logic layer, UI, or output layer. Memory is currently very cheap-therefore, implementing caching in the entire
Cache Design1. When to use the cache
Caching is one of the best ways to improve application performance. Cache can be used to optimize data query, avoid unnecessary network data return, and avoid unnecessary identical data processing logic. When
A major limitation of Web application systems is the customer's speed. Therefore, the speed of communication over the Internet is limited. Therefore, it is essential for developers to speed up Internet application systems.
Today, we will only talk
We add three buttons on the page and double-click the button to create an event handling method. The three buttons use different expiration policies to add cache.
Onclick = "btn_insertnoexpirationcache_click"/>Expired cache "onclick ="
/// /// set the Cache value of the Key specified by the current application. /// /// /// /// expiration time DateTime. now. addMinutes (10D) public static void SetAbsoluteCache (string key, object value, double minutes) {HttpRuntime. cache.
1. why use cache
Can increase performance by storing memory data that is access frequently and that requires signficant processing time to create.
2. application cache
The application cache provide a programmatic way for you to store arbitaray data
Link: http://msdn.microsoft.com/zh-cn/library/aa478965.aspx
ASP. NET provides three main forms of cache: page-level output cache, user control-level output cache (or segment cache), and cache API. The advantage of output cache and fragment cache is
Among the many features provided by ASP. NET, caching supports the features I like most. compared with all other features of ASP. NET, caching applies to applications.
Program The performance has the greatest potential impact, using caching and
1. Cache category
In terms of distribution, we can summarize the Client Cache and server cache. As shown in Figure 15-1:
Figure15-1 Cache category
Client Cache-- This is an intuitive impression. For example, when you go to a new
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.