Cache consistency when using memcached and a rdbms like MySQL

后端 未结 4 676
无人及你
无人及你 2021-02-14 04:32

I have taken a database class this semester and we are studying about maintaining cache consistency between the RDBMS and a cache server such as memcached. The consistency issue

4条回答
  •  一向
    一向 (楼主)
    2021-02-14 05:07

    How about using a variable save in memcache as a lock signal?

    every single memcache command is atomic

    after you retrieved data from db, toggle lock on

    after you put data to memcache, toggle lock off

    before delete from db, check lock state

提交回复
热议问题