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 website, it may take a while for the first time to load the entire page. In the future, the time will be greatly shortened, because the client cache. Today, browsers are intelligent, and many static files, such as GIF and JPEG files, are retained on the hard disk of the customer's machine. When you try again later, it tries its best to use the files in the local cache. Only when files on the server have been updated or the files in the cache have expired will they be downloaded from the server again. Most of the time, ie has done this for us.
Server cache --Some things cannot be cached on the client, so we have to find a solution on the server. Server-side cache can be divided into two types in terms of nature.
(1)Static File Cache
Many pages are static and rarely changed. Therefore, such files are most suitable for static cache. Currently, IIS 6.0 is directly stored in the kernel memory and managed by HTTP. sys. Because it is in the kernel space, its performance is very high. If your request is in the cache, then HTTP. sys directly sends the content to the network driver. You do not need to copy the content from the user space memory of IIS to the kernel as before, and then send it to the TCP/IP stack. Kernel level cache is almost an essential feature of high-performance Web servers.
(2)Dynamic Cache
Dynamic Caching is more difficult. Because you should always pay attention to the problem when caching, that is, whether the cached content is out of date. If the content is outdated, it may cause serious consequences. For example, a website that buys or sells shares online. The price you offer to others is out of date, and the people will not cut you down. It is very complicated to find out whether the cache is outdated.
In ASP. NET, the common dynamic cache mainly includes the following methods:
ØTraditional cache Methods
ØPage output Cache.
ØPartial page cache.
ØUse the system. Web. caching cache provided by. net.
ØCache dependency.
2. Traditional cache Methods
For example, you can store reusable items in an application or session.
Session ["style"] = val;
Application ["count"] = 0;
System cache resolutionArticleIndex
- System cache Resolution 1: Overview of system cache
- System cache Resolution 2: page output Cache
- System cache resolution 3: Partial page Cache
- System cache resolution 4: Application Data Cache
- System cache resolution 5: File Cache dependency
- System cache resolution 6: database cache dependency
- System cache resolution 7: third-party distributed cache solutions memcached and cacheman
Text excerpt: http://www.cnblogs.com/ltp/archive/2009/06/30/1514311.html
Purpose: make it easy for you to learn and summarize