Skip to content

Commit

Permalink
Merge pull request #17 from liu3734/patch-1
Browse files Browse the repository at this point in the history
fix cache
  • Loading branch information
flycash authored Mar 2, 2023
2 parents 322c41e + 2b31c53 commit 163f338
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cache/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
为了方便讨论,这里就将问题简化为 DB 和缓存一致性。也就是更新只需要更新 DB 和缓存。

首先要记住,缓存一致性的问题根源于两个原因:
- 不同线程并发更新 DB 和数据库
- 不同线程并发更新 DB 和缓存
- 即便是同一个线程,更新 DB 和更新缓存是两个操作,容易出现一个成功一个失败的情况;

缓存和 DB 一致性的问题可以说是无最优解的。无论选择哪个方案,总是会有一些缺点。
Expand Down

0 comments on commit 163f338

Please sign in to comment.