Coder Social home page Coder Social logo

Comments (3)

BuptStEve avatar BuptStEve commented on June 12, 2024

你指的是 storage 不是内存吧?

目前的策略比较简单,每分钟遍历一遍把过期的数据删掉。
还没想好怎么把各种策略(比如FIFO、LRU)集成进来。

from tua-storage.

spiderT avatar spiderT commented on June 12, 2024

指的是 storage。
实际项目中可能有人把过期时间设置的很长,以至于不能及时清除数据,导致存储满了。
目前工作的项目中,计划当storage存储使用大于一个值后,采用FIFO,或者按过期时间远近两种策略清除缓存,不太确定的是什么时候计算storage使用量比较好,如果每次存的时候计算,会不会太频繁了。

from tua-storage.

BuptStEve avatar BuptStEve commented on June 12, 2024

我想想...
在 storage 里存这样一个数据:每条记录的保存时间,过期时间,上次使用时间、大小等信息。
基于这个数据就可以做一些策略控制?

from tua-storage.

Related Issues (15)

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.