Skip to content

Commit

Permalink
Update README for v1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mgaffney committed Aug 8, 2023
1 parent bdf35e3 commit a032ef5
Showing 1 changed file with 4 additions and 22 deletions.
26 changes: 4 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,7 @@
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](https://pkg.go.dev/github.com/hashicorp/golang-lru)

Example
=======

Using the LRU is very simple:

```go
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()))
}
```
Please upgrade to github.com/hashicorp/golang-lru/v2 for all new code as v1 will
not be updated anymore. The v2 version supports generics and is faster; old code
can specify a specific tag, e.g. github.com/hashicorp/golang-lru/v1.0.2 for
backwards compatibility.

0 comments on commit a032ef5

Please sign in to comment.