We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cache整个库, 在cache整个库的基础上,做二级缓存,来cache计算结果。
性能最佳,但复杂度过高,维护一致性会非常麻烦.
直接cache计算结果。不cache整库。
在cache miss的情况下,性能会有一定影响。当元数据更新之后,不会立即使cache失效,会有一定滞后。但编程复杂度低,容易实现,容易排错。
路由部分配置,属于读多写少。cache 失效的频次会比较低。配置更新的实时性要求没有那么高。 故选择第二种cache策略
失效
命中
更新
Read Through
Write Through
cache更新的套路 by 左耳朵耗子
The text was updated successfully, but these errors were encountered:
No branches or pull requests
网关路由Cache策略分析
两种cache策略
两级cache
cache计算结果
TradeOff
缓存更新的套路
失效
:应用先从cache取数据,没有得到,则从数据库中取数据,成功后,放到缓存中。命中
: 应用程序从cache中取数据,渠道后返回。更新
: 先把数据存到数据库中,成功后,再让缓存失效。Read Through
: 直接读cache,若未命中,则由缓存服务拉取数据,并更新cache。Write Through
:直接写cache,由cache自己异步更新DB, 速度快,数据并非强一致性。
The text was updated successfully, but these errors were encountered: