Giter Site home page Giter Site logo

关于本地缓存的剔除 about jetcache HOT 6 OPEN

wp973 avatar wp973 commented on June 8, 2024
关于本地缓存的剔除

from jetcache.

Comments (6)

areyouok avatar areyouok commented on June 8, 2024 1

这样做JVM有OOM的风险,而且还要引入限流类库的依赖,这只能靠你自己解决了,如果需要你可以改改代码

from jetcache.

areyouok avatar areyouok commented on June 8, 2024

没有这个限制。如果写多读少的话,建议就不要做本地缓存了

from jetcache.

wp973 avatar wp973 commented on June 8, 2024

嗯,可能有这种情况,redis中数据一天更新一次,然后更新方法是使用的DataX,速率比较快

from jetcache.

areyouok avatar areyouok commented on June 8, 2024

正常来说,同步的流程限速就要堵塞上游。否则上游处理飞快,下游又想限速,那中间这些数据存储在哪,存在jvm里面肯定会爆的。

削峰填谷,那是消息队列的事,不该由缓存框架来干。

from jetcache.

wp973 avatar wp973 commented on June 8, 2024

嗯对的,下游消费确实不应该限速。

但是对于消费方,可不可以把消费到的数据放到一个队列里(如concurrentLinkedQueue),然后自己去控制缓存剔除的速率,这样是否可行呢?:D

from jetcache.

wp973 avatar wp973 commented on June 8, 2024

嗯嗯了解了,感谢大佬的回复!-v-

from jetcache.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.