1
1
mirror of https://github.com/go-gitea/gitea synced 2024-11-14 22:24:24 +00:00
gitea/vendor/github.com/hashicorp/golang-lru
6543 fae07cbc8f
Update Vendor (#16325)
* Add Dependencie Update Script

* update gitea.com/lunny/levelqueue

* update github.com/PuerkitoBio/goquery

* update github.com/alecthomas/chroma

* update github.com/blevesearch/bleve/v2

* update github.com/caddyserver/certmagic

* update github.com/go-enry/go-enry/v2

* update github.com/go-redis/redis/v8

* update github.com/hashicorp/golang-lru

* update github.com/klauspost/compress

* update github.com/markbates/goth

* update github.com/mholt/archiver/v3

* update github.com/microcosm-cc/bluemonday

* update github.com/minio/minio-go/v7

* update github.com/olivere/elastic/v7

* update github.com/xanzy/go-gitlab

* update github.com/yuin/goldmark
2021-07-04 04:06:10 +02:00
..
simplelru Update Vendor (#16325) 2021-07-04 04:06:10 +02:00
.gitignore Speed up git diff highlight generation (#16180) 2021-06-17 10:55:16 -04:00
2q.go Speed up git diff highlight generation (#16180) 2021-06-17 10:55:16 -04:00
arc.go Speed up git diff highlight generation (#16180) 2021-06-17 10:55:16 -04:00
doc.go Speed up git diff highlight generation (#16180) 2021-06-17 10:55:16 -04:00
go.mod Update Vendor (#16325) 2021-07-04 04:06:10 +02:00
LICENSE Speed up git diff highlight generation (#16180) 2021-06-17 10:55:16 -04:00
lru.go Update Vendor (#16325) 2021-07-04 04:06:10 +02:00
README.md Speed up git diff highlight generation (#16180) 2021-06-17 10:55:16 -04:00

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()))
}