Cache consistency when using memcached and a rdbms like MySQL

前端 未结 4 2051
鱼传尺愫
鱼传尺愫 2021-02-14 03:30

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 04:23

    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

提交回复
热议问题