Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache []*cacheShard
func (*Cache) Add ¶
Returns true if object already existed, false otherwise.
type LRUExpireCache ¶
type LRUExpireCache struct {
// contains filtered or unexported fields
}
func NewLRUExpireCache ¶
func NewLRUExpireCache(maxSize int) *LRUExpireCache
func (*LRUExpireCache) Add ¶
func (c *LRUExpireCache) Add(key lru.Key, value interface{}, ttl time.Duration)
func (*LRUExpireCache) Get ¶
func (c *LRUExpireCache) Get(key lru.Key) (interface{}, bool)
Source Files
¶
- cache.go
- lruexpirecache.go
Click to show internal directories.
Click to hide internal directories.