Cache consistency when using memcached and a rdbms like MySQL

后端 未结 4 833
太阳男子
太阳男子 2021-02-14 03:59

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:06

    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

提交回复
热议问题