Skip to content

Commit 517ec93

Browse files
committed
Merge branch 'dev'
2 parents 0f45c08 + 24607c7 commit 517ec93

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
# MemoryCache
1+
<div align="center">
2+
<h1>MemoryCache</h1>
3+
<img src="assets/logo.png" alt="logo" width="300px">
4+
<h5>To the time to life, rather than to life in time.</h5>
5+
</div>
6+
27

38
[中文](README_CN.md)
49

@@ -84,7 +89,7 @@ func main() {
8489
goos: linux
8590
goarch: amd64
8691
pkg: github.com/lxzan/memorycache/benchmark
87-
cpu: AMD EPYC 7763 64-Core Processor
92+
cpu: AMD EPYC 7763 64-Core Processor
8893
BenchmarkMemoryCache_Set-4 11106261 100.6 ns/op 18 B/op 0 allocs/op
8994
BenchmarkMemoryCache_Get-4 635988 77.30 ns/op 0 B/op 0 allocs/op
9095
BenchmarkRistretto_Set-4 7933663 491.8 ns/op 170 B/op 2 allocs/op

README_CN.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
# MemoryCache
1+
<div align="center">
2+
<h1>MemoryCache</h1>
3+
<img src="assets/logo.png" alt="logo" width="300px">
4+
<h5>To the time to life, rather than to life in time.</h5>
5+
</div>
26

37
[![Build Status][1]][2] [![codecov][3]][4]
48

@@ -20,7 +24,7 @@
2024

2125
1. 存储数据限制:受最大容量限制
2226
2. 过期时间:支持
23-
3. 缓存淘汰策略:类似LRU
27+
3. 缓存淘汰策略:类似 LRU
2428
4. GC 优化:无
2529
5. 持久化:无
2630
6. 锁定机制:分片和互斥锁
@@ -60,7 +64,7 @@ func main() {
6064
memorycache.WithBucketSize(1000, 10000), // Bucket size, initial size and maximum capacity.
6165
memorycache.WithInterval(5*time.Second, 30*time.Second), // Active cycle cleanup interval and expiration time.
6266
)
63-
defer mc.Stop()
67+
defer mc.Stop()
6468

6569
mc.Set("xxx", 1, 10*time.Second)
6670

@@ -82,7 +86,7 @@ func main() {
8286
goos: linux
8387
goarch: amd64
8488
pkg: github.com/lxzan/memorycache/benchmark
85-
cpu: AMD EPYC 7763 64-Core Processor
89+
cpu: AMD EPYC 7763 64-Core Processor
8690
BenchmarkMemoryCache_Set-4 11106261 100.6 ns/op 18 B/op 0 allocs/op
8791
BenchmarkMemoryCache_Get-4 635988 77.30 ns/op 0 B/op 0 allocs/op
8892
BenchmarkRistretto_Set-4 7933663 491.8 ns/op 170 B/op 2 allocs/op

assets/logo.png

332 KB
Loading

0 commit comments

Comments
 (0)