@@ -8,25 +8,25 @@ go-generics-cache is an in-memory key:value store/cache that is suitable for app
8
8
- implemented with [ Go Generics] ( https://go.dev/blog/generics-proposal )
9
9
- TTL supported (with expiration times)
10
10
- Simple cache is like ` map[string]interface{} `
11
- - See [ examples] ( https://github.com/Code-Hex/go-generics-cache/blob/main/simple/example_test.go )
11
+ - See [ examples] ( https://github.com/Code-Hex/go-generics-cache/blob/main/policy/ simple/example_test.go )
12
12
- Cache replacement policies
13
13
- ** Least recently used (LRU)**
14
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 )
15
+ - See [ examples] ( https://github.com/Code-Hex/go-generics-cache/blob/main/policy/ lru/example_test.go )
16
16
- ** Least-frequently used (LFU)**
17
17
- Counts how often an item is needed. Those that are used least often are discarded first.
18
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 )
19
+ - See [ examples] ( https://github.com/Code-Hex/go-generics-cache/blob/main/policy/ lfu/example_test.go )
20
20
- ** First in first out (FIFO)**
21
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
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)
23
+ - See [examples](https://github.com/Code-Hex/go-generics-cache/blob/main/policy/ fifo/example_test.go)
24
24
- ** Most recently used (MRU)**
25
25
- In contrast to Least Recently Used (LRU), MRU discards the most recently used items first.
26
- - See [examples](https://github.com/Code-Hex/go-generics-cache/blob/main/mru/example_test.go)
26
+ - See [examples](https://github.com/Code-Hex/go-generics-cache/blob/main/policy/ mru/example_test.go)
27
27
- ** Clock**
28
28
- Clock is a more efficient version of FIFO than Second-chance cache algorithm.
29
- - See [examples](https://github.com/Code-Hex/go-generics-cache/blob/main/clock/example_test.go)
29
+ - See [examples](https://github.com/Code-Hex/go-generics-cache/blob/main/policy/ clock/example_test.go)
30
30
31
31
## Requirements
32
32
0 commit comments