Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cache ¶
type Cache interface { Get(string) (CacheEntry, bool) Set(string, CacheEntry) }
type CacheEntry ¶
type CacheEntry struct {
// contains filtered or unexported fields
}
func NewCacheEntry ¶
func NewCacheEntry(data [][]byte, metadata []byte) CacheEntry
func (*CacheEntry) Data ¶
func (c *CacheEntry) Data() [][]byte
func (*CacheEntry) Metadata ¶
func (c *CacheEntry) Metadata() []byte
func (*CacheEntry) Size ¶
func (c *CacheEntry) Size() int
type NoCache ¶
type NoCache struct{}
func NewNoCache ¶
func NewNoCache() *NoCache
func (*NoCache) Set ¶
func (c *NoCache) Set(key string, val CacheEntry)
type RistrettoCache ¶
func NewRistrettoCache ¶
func NewRistrettoCache(cacheSize uint64) *RistrettoCache
func (*RistrettoCache) Get ¶
func (c *RistrettoCache) Get(key string) (val CacheEntry, hit bool)
func (*RistrettoCache) Set ¶
func (c *RistrettoCache) Set(key string, val CacheEntry)
Click to show internal directories.
Click to hide internal directories.