hulk
V2EX  ›  编程

golang lru cache

  •  
  •   hulk · Feb 6, 2017 · 4952 views
    This topic created in 3413 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   ·   2698 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 15:19 · PVG 23:19 · LAX 08:19 · JFK 11:19
    ♥ Do have faith in what you're doing.