golang-lru

Golang LRU cache

  • Owner: hashicorp/golang-lru
  • Platform:
  • License:: Mozilla Public License 2.0
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

golang-lru

This provides the lru package which implements a fixed-size
thread safe LRU cache. It is based on the cache in Groupcache.

Documentation

Full docs are available on Godoc

Example

Using the LRU is very simple:

l, _ := New(128)
for i := 0; i < 256; i++ {
    l.Add(i, nil)
}
if l.Len() != 128 {
    panic(fmt.Sprintf("bad len: %v", l.Len()))
}

Main metrics

Overview
Name With Ownerhashicorp/golang-lru
Primary LanguageGo
Program languageGo (Language Count: 1)
Platform
License:Mozilla Public License 2.0
所有者活动
Created At2014-08-06 22:14:53
Pushed At2025-06-11 09:36:49
Last Commit At
Release Count21
Last Release Namearc/v2.0.7 (Posted on )
First Release Namev0.5.0 (Posted on )
用户参与
Stargazers Count4.7k
Watchers Count330
Fork Count517
Commits Count153
Has Issues Enabled
Issues Count76
Issue Open Count31
Pull Requests Count60
Pull Requests Open Count19
Pull Requests Close Count42
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private