Documentation ¶ Index ¶ type Cache func NewLRUCache(size int, ttl time.Duration) Cache type Value Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Cache ¶ type Cache interface { // fetch a value from cache, returns nil, false on miss Get(key string) (Value, bool) // sets a value in cache. overrites any existing value Set(key string, value Value) } func NewLRUCache ¶ func NewLRUCache(size int, ttl time.Duration) Cache Creates an LRUCache with maximum size, ttl for items. type Value ¶ type Value interface{} Source Files ¶ View all Source files generate_mocks.golru_cache.go Directories ¶ Show internal Expand all Path Synopsis mocks Click to show internal directories. Click to hide internal directories.