hulk
V2EX  ›  编程

golang lru cache

  •  
  •   hulk · Feb 6, 2017 · 5006 views
    This topic created in 3444 days ago, the information mentioned may be changed or developed.

    前一段时间由于 golang 项目开发需要使用到 lru cache, 找了当前开源的几个版本都不太符合需求,所以自己基于 groupcache 的 lru 之上手撸了一个,放出来让大家拍拍砖。我们自己的对于 lru cache 的基本需求:

    1. 能控制最大数目,超过可以剔除
    2. 支持过期时间

    地址: https://github.com/git-hulk/go-lru

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3302 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 00:34 · PVG 08:34 · LAX 17:34 · JFK 20:34
    ♥ Do have faith in what you're doing.