Memcached, Locking and Race Conditions

前端 未结 4 1174
心在旅途
心在旅途 2021-02-02 13:14

We are trying to update memcached objects when we write to the database to avoid having to read them from database after inserts/updates.

For our forum post object we ha

4条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-02 13:30

    I'm thinking - could a solution be to store viewcount seperately from the Post object, and then do an INCR on it. Of course this would require reading 2 seperate values from memcached when displaying the information.

提交回复
热议问题