Last time we learned what is memcache after the next we see how memcache is updated, we only know that he is the cache, but the cache is also limited by the size of the HA, So,ta update process is how it, together to see.
The approximate steps are as follows:
1, check whether the data of request is in Memcache, if, directly return, do not do anything to the data
2, but if no longer, that will go to the DB, check out the data back, but also to save a copy to Memcache, so that the next time you can return directly
3, each update of the DB at the same time also to update the data in the memcache, to ensure that the memcache and DB data consistent, otherwise .... You know
4. Can the memcache be infinitely large? Inevitably, when the memory allocated to Memcache is exhausted, the LRU (least recently) policy is used, that is, the failed data preference is replaced, and the data that has not been used recently is replaced.
OK, this understanding of TA's update process, it is not very simple. Today, the knowledge is a little learning, not a bite to eat into the fat, I am also under the guidance of Xiao Qiang Teacher Self-study summary, there is no place please point out oh.
Next preview, Memcache installation Babababa ....
Xiao Qiang Performance Test training course and Python automated test course June enrollment, a lifetime free re-learning (unlimited number of)
Sign up to contact qq:2083503238, 1684129674, 480934277
Blog: http://xqtesting.blog.51cto.com
QQ Group: 138269539
Public number
650) this.width=650; "alt=" 0 "src=" http://ugc.qpic.cn/gbar_pic/ hpcxh1lmahiaeniczsrrteryysvdu3eqia06hm4g0mlonp1j05pz7tdva/0 "style=" margin:0px;padding:0px;border:none; Vertical-align:middle;height:auto; "/>
This article is from the "Xiao Qiang performance test & Product Manager Nest" blog, make sure to keep this source http://xqtesting.blog.51cto.com/4626073/1788212
Memcache update Process "Xiao Qiang Performance training course student Works"