Documentation
¶
Index ¶
- type Cache
- func (c *Cache) Del(key []byte)
- func (c *Cache) Get(dst, key []byte) []byte
- func (c *Cache) GetBig(dst, key []byte) []byte
- func (c *Cache) Has(key []byte) bool
- func (c *Cache) HasGet(dst, key []byte) ([]byte, bool)
- func (c *Cache) LoadFromFile(filePath string) error
- func (c *Cache) Reset()
- func (c *Cache) SaveToFileConcurrent(filePath string, concurrency int) error
- func (c *Cache) Set(key, value []byte)
- func (c *Cache) SetBig(key, value []byte)
- func (c *Cache) UpdateStats(s *Stats)
- type Stats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache is a high-performance sharded LRU byte cache. It provides O(1) lookups with minimal lock contention.
func (*Cache) LoadFromFile ¶
LoadFromFile is a no-op for compatibility with fastcache API.
func (*Cache) SaveToFileConcurrent ¶
SaveToFileConcurrent is a no-op for compatibility with fastcache API.
func (*Cache) UpdateStats ¶
UpdateStats populates the provided stats struct.
Click to show internal directories.
Click to hide internal directories.