你应该学会的 bigcache 优化技巧( 四 )


删除还是一样 , 只是从 map 中删除 , 不会从chunks中删除 。
fastcache 没有过期的概念 , 所以缓存对象不会被过期剔除 。
参考文档

  1. http://allegro.tech/2016/03/writing-fast-cache-service-in-go.html
  2. https://github.com/allegro/bigcache
  3. https://dev.to/douglasmakey/how-bigcache-avoids-expensive-gc-cycles-and-speeds-up-concurrent-access-in-go-12bb
  4. https://pengrl.com/p/35302/
  5. https://github.com/VictoriaMetrics/fastcache
  6. https://www.openmymind.net/Shard-Your-Hash-table-to-reduce-write-locks/
  7. https://medium.com/@itsromiljain/curious-case-of-concurrenthashmap-90249632d335
  8. https://segmentfault.com/a/1190000012926722
  9. https://github.com/coocood/freecache
文中链接[1]
[译] Go开源项目BigCache如何加速并发访问以及避免高额的GC开销: https://pengrl.com/p/35302/
[2]
How BigCache avoids expensive GC cycles and speeds up concurrent access in Go: https://dev.to/douglasmakey/how-bigcache-avoids-expensive-gc-cycles-and-speeds-up-concurrent-access-in-go-12bb
[3]
Writing a very fast cache service with millions of entries in Go: https://allegro.tech/2016/03/writing-fast-cache-service-in-go.html
[4]
fastcache: https://github.com/VictoriaMetrics/fastcache
[5]
LRU groups cache: https://github.com/golang/groupcache/tree/master/lru
[6]
go-cache: https://github.com/patrickmn/go-cache
[7]
ttlcache: https://github.com/diegobernardes/ttlcache
[8]
freecache: https://github.com/coocood/freecache
[9]
concurrent-map: https://github.com/orcaman/concurrent-map
[10]
hash-bench: https://github.com/smallnest/hash-bench
[11]
offheap: https://godoc.org/github.com/glycerine/offheap
[12]
Java: ChronicleMap, Part 1: Go Off-Heap: https://dzone.com/articles/java-chroniclemap-part-1-go-off-heap
[13]
freecache: https://github.com/coocood/freecache
[14]
#9477: https://github.com/golang/go/issues/9477
[15]
fastcache: https://github.com/VictoriaMetrics/fastcache

【你应该学会的 bigcache 优化技巧】


推荐阅读