Draft Cache Policy Design Based on instant update

Source: Internet
Author: User

The overall cache is mainly grafted on memcached and redis. memcached is an atomic key-value operation. redis places the list in redis with its set and sortedset functions to improve overall system performance.

Enable Level 2 Cache. before writing data to the cache, store the local queue locally, write data to the database, and update the cache so that all front-end servers can synchronize data. When reading data, the cache is lazyloading, read the cache first. If the cache does not exist, read the database data to the cache to speed up the system initialization time. The cache settings automatically expire, but update the cache only when the data is updated; the disadvantage of doing so is that the cache capacity is quite large;

The cache adopts a three-layer cache structure, which includes data persistence layer Po, business logic layer Bo, and presentation layer VO. Each level of cache depends on the downstream layer.

 

The downward registration mode indicates that the BL layer is registered with the BL layer and the BL is registered with the Dal layer. However, BL does not need to care about the specific use of VO, just to update the Bo, know to clear those Vo, and prove the Relationship Between Po and Bo in the same way;

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.