Versions in this module Expand all Collapse all v1 v1.1.0 Mar 27, 2018 Changes in this version + func DefaultLogger() *log.Logger type BigCache + func (c *BigCache) Delete(key string) error + func (c *BigCache) Stats() Stats type Config + Logger Logger + type Logger interface + Printf func(format string, v ...interface{}) + type Stats struct + Collisions int64 + DelHits int64 + DelMisses int64 + Hits int64 + Misses int64 v1.0.0 Sep 20, 2017 Changes in this version + const ErrCannotRetrieveEntry + const ErrInvalidIteratorState + type BigCache struct + func NewBigCache(config Config) (*BigCache, error) + func (c *BigCache) Get(key string) ([]byte, error) + func (c *BigCache) Iterator() *EntryInfoIterator + func (c *BigCache) Len() int + func (c *BigCache) Reset() error + func (c *BigCache) Set(key string, entry []byte) error + type Config struct + CleanWindow time.Duration + HardMaxCacheSize int + Hasher Hasher + LifeWindow time.Duration + MaxEntriesInWindow int + MaxEntrySize int + OnRemove func(key string, entry []byte) + Shards int + Verbose bool + func DefaultConfig(eviction time.Duration) Config + type EntryInfo struct + func (e EntryInfo) Hash() uint64 + func (e EntryInfo) Key() string + func (e EntryInfo) Timestamp() uint64 + func (e EntryInfo) Value() []byte + type EntryInfoIterator struct + func (it *EntryInfoIterator) SetNext() bool + func (it *EntryInfoIterator) Value() (EntryInfo, error) + type EntryNotFoundError struct + func (e EntryNotFoundError) Error() string + type Hasher interface + Sum64 func(string) uint64