Skip to content

Commit

Permalink
readme: add Dump example
Browse files Browse the repository at this point in the history
  • Loading branch information
qianbin committed May 26, 2022
1 parent e961a89 commit e7726d3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@ shouldEvict := func(entry directcache.Entry) bool {
c.SetEvictionPolicy(shouldEvict)
```

dump entries

```go
c.Dump(func(e directcache.Entry) bool {
// do something to e
return true
})
```


### Benchmarks

The performance is compared with [FreeCache](https://github.com/coocood/freecache), [FastCache](https://github.com/VictoriaMetrics/fastcache) and [BigCache](https://github.com/allegro/bigcache). The code of benchmarks can be found under [./benches/](./benches/).
Expand Down

0 comments on commit e7726d3

Please sign in to comment.