fanjindong/go-cache

能讲解一下并发读写下性能比patrickmn/go-cache好的原因吗

Closed this issue · 3 comments

uns3t commented

两个go-cache都用的map进行读写,同时保证并发安全的方式也都是用的sync.RWMutex

并发读写场景下,最主要的原因是sharding,它带来了性能的巨大提升

uns3t commented

明白了,感谢

why not english? chinese