Documentation
¶
Index ¶
- type Cache
- type Item
- type ItemAI
- type LRUCache
- func (c *LRUCache) Cap() int
- func (c *LRUCache) Get(key interface{}) (val interface{}, err error)
- func (c *LRUCache) Has(key interface{}) bool
- func (c *LRUCache) Len() int
- func (c *LRUCache) Remove(key interface{}) (err error)
- func (c *LRUCache) Set(key, val interface{}) error
- func (c *LRUCache) SetWithExpire(key, val interface{}, expire time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { Set(key, val interface{}) error SetWithExpire(key, val interface{}, expire time.Duration) error Get(key interface{}) (interface{}, error) Remove(key interface{}) error Has(key interface{}) bool Len() int Cap() int }
func NewLRUCache ¶
type Item ¶
type ItemAI ¶
type ItemAI struct {
// contains filtered or unexported fields
}
func (*ItemAI) SetExpired ¶
func (i *ItemAI) SetExpired()
Click to show internal directories.
Click to hide internal directories.