hulk
V2EX  ›  编程

golang lru cache

  •  
  •   hulk · Feb 6, 2017 · 4945 views
    This topic created in 3409 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   ·   3730 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 72ms · UTC 04:39 · PVG 12:39 · LAX 21:39 · JFK 00:39
    ♥ Do have faith in what you're doing.