Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IStore ¶
type IStore interface { Get(key interface{}) (value interface{}, ok bool) Add(key, value interface{}) Remove(key interface{}) }
type LruCacheAdapter ¶
type LruCacheAdapter struct {
// contains filtered or unexported fields
}
func (*LruCacheAdapter) Add ¶
func (l *LruCacheAdapter) Add(key, value interface{})
func (*LruCacheAdapter) Get ¶
func (l *LruCacheAdapter) Get(key interface{}) (value interface{}, ok bool)
func (*LruCacheAdapter) Remove ¶
func (l *LruCacheAdapter) Remove(key interface{})
type TwoQueueCache ¶
type TwoQueueCache struct {
// contains filtered or unexported fields
}
func NewTwoQueueCache ¶
func NewTwoQueueCache(size int, ttl time.Duration, options ...TwoQueueCacheOption) *TwoQueueCache
type TwoQueueCacheOption ¶
type TwoQueueCacheOption func(*TwoQueueCache)
func WithGhostRatio ¶
func WithGhostRatio(ghostRatio float64) TwoQueueCacheOption
func WithRecentRatio ¶
func WithRecentRatio(recentRatio float64) TwoQueueCacheOption
Click to show internal directories.
Click to hide internal directories.