Microsoft enterprise database 5.0 System (I): using the cache Microsoft. Practices. enterpriselibrary. caching (advanced)

Source: Internet
Author: User

1. Basic architecture of Microsoft. Practices. enterpriselibrary. caching

Before deciding where to save the cache data, we need to first understand the two cache types defined by the caching Application Block,
They are memory-resident caches and disk-resident caches. As the name suggests, these two types of caches are named by storage locations,
In terms of function, the difference is based on whether the cached data can be persisted.

In the caching Application Block, the following four methods are provided to save cache data: memory storage (default)
, Independent storage (isolated storage), database cache storage, and custom storage (custom cache storage ).
1. Memory storage: the memory storage cache is the only memory resident cache in the above four methods. It is also the most common way in our development,
The advantage of fast response speed is unmatched by other methods. However, if you use this method alone, the following drawbacks may occur:
1. cache data cannot be persistent. After the server restarts, All cached data will be lost.
2. If the server uses the memory cache when using Server Load balancer, ensure that the memory cache status of multiple servers is synchronized,
However, this will put a lot of pressure on Io and cause system bottlenecks. Therefore, from the perspective of system performance and development costs, it is not easy to use memory cache in a server Load balancer environment.

2. Independent cache (isolated storage): isolated storage is an option for caching data persistence,
It is a disk resident cache. If you are careful enough, you will find an isolatedstorage folder on each machine;
With independent caching, our cache information will be saved in this folder in the form of binary files,
The following is the directory where the cache information generated after the cache data is used:
C: \ Documents ents and Settings \ Administrator \ Local Settings \ Application Data \ isolatedstorage

3. Custom Storage.

4. database cache storage: see
Http://www.cnblogs.com/artech/archive/2008/08/11/1265055.html

 

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.