Documentation ¶ Index ¶ type Cache type CacheStats type LruCache func New(maxSize int, maxAge time.Duration) *LruCache func (c *LruCache) Get(key string) (interface{}, bool) func (c *LruCache) Put(key string, item interface{}, byteSize int) error func (c *LruCache) Stats() CacheStats Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Cache ¶ type Cache interface { Put(key string, item interface{}, byteSize int) error Get(key string) (interface{}, bool) Stats() CacheStats } type CacheStats ¶ type CacheStats struct { TimeToEviction []time.Duration ByteSize int ItemCount int AgeEvictCount int SizeEvictCount int ReplaceCount int StatDuration time.Duration } type LruCache ¶ type LruCache struct { // contains filtered or unexported fields } func New ¶ func New(maxSize int, maxAge time.Duration) *LruCache func (*LruCache) Get ¶ func (c *LruCache) Get(key string) (interface{}, bool) func (*LruCache) Put ¶ func (c *LruCache) Put(key string, item interface{}, byteSize int) error func (*LruCache) Stats ¶ func (c *LruCache) Stats() CacheStats Source Files ¶ View all Source files cache.go Click to show internal directories. Click to hide internal directories.