Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache[K comparable, V any] struct { // contains filtered or unexported fields }
Cache 是一个线程安全的只读高并发缓存
func (*Cache[K, V]) GetAll ¶ added in v0.0.23
func (c *Cache[K, V]) GetAll() map[K]V
GetAll 获取所有数据(无锁、零拷贝)
func (*Cache[K, V]) ReplaceAll ¶ added in v0.0.22
func (c *Cache[K, V]) ReplaceAll(newMap map[K]V)
ReplaceAll 全量替换(数据库 reload)
Click to show internal directories.
Click to hide internal directories.