Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct { sync.Mutex MaxEntries int // 0 -> no limit OnExpire ExpireHandler // invoke when expire delete // contains filtered or unexported fields }
func New ¶
func New(maxEntries int, handler ExpireHandler) *Cache
func (*Cache) RemoveOldest ¶
func (c *Cache) RemoveOldest()
type ExpireHandler ¶
Click to show internal directories.
Click to hide internal directories.