Skip to content

Commit 7f4450d

Browse files
committed
fixed README
1 parent 732374b commit 7f4450d

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

README.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,21 @@ go-generics-cache is an in-memory key:value store/cache that is suitable for app
66

77
- a thread-safe
88
- implemented with [Go Generics](https://go.dev/blog/generics-proposal)
9-
- Simple cache is like `map[string]interface{}` with expiration times
9+
- TTL supported (with expiration times)
10+
- Simple cache is like `map[string]interface{}`
1011
- See [examples](https://github.com/Code-Hex/go-generics-cache/blob/main/simple/example_test.go)
11-
- LRU cache
12-
- See [examples](https://github.com/Code-Hex/go-generics-cache/blob/main/lru/example_test.go)
13-
- LFU cache
14-
- See [examples](https://github.com/Code-Hex/go-generics-cache/blob/main/lfu/example_test.go)
15-
- [An O(1) algorithm for implementing the LFU cache eviction scheme](http://dhruvbird.com/lfu.pdf)
12+
- Cache replacement policies
13+
- Least recently used (LRU)
14+
- Discards the least recently used items first.
15+
- See [examples](https://github.com/Code-Hex/go-generics-cache/blob/main/lru/example_test.go)
16+
- Least-frequently used (LFU)
17+
- Counts how often an item is needed. Those that are used least often are discarded first.
18+
- [An O(1) algorithm for implementing the LFU cache eviction scheme](http://dhruvbird.com/lfu.pdf)
19+
- See [examples](https://github.com/Code-Hex/go-generics-cache/blob/main/lfu/example_test.go)
20+
- First in first out (FIFO)
21+
- Using this algorithm the cache behaves in the same way as a [FIFO queue](https://en.wikipedia.org/wiki/FIFO_(computing_and_electronics)).
22+
- The cache evicts the blocks in the order they were added, without any regard to how often or how many times they were accessed before.
23+
- See [examples](https://github.com/Code-Hex/go-generics-cache/blob/main/fifo/example_test.go)
1624

1725
## Requirements
1826

0 commit comments

Comments
 (0)