Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Finite ¶
type Finite struct { C <-chan interface{} // Objects can be pulled from the cache via this channel. This channel will be closed when the cache is closed. Note that a cache is unordered: the order in which objects are recovered from the cache via this channel has no relation to the order in which they were added to the cache. // contains filtered or unexported fields }
Finite is a cache of fixed size used for storing unordered data. It will flush automatically when full, and on close.
func NewFinite ¶
NewFinite returns a new finite cache of maximum size maxSize using the given flush function.
func (*Finite) FlushAllButN ¶
FlushAllButN flushes all but N elements from the cache.
Click to show internal directories.
Click to hide internal directories.