item

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LfuItem

type LfuItem struct {
	Key         interface{}
	Value       interface{}
	FreqElement *list.Element
	Expiration  *time.Time
}

func (*LfuItem) Expire

func (it *LfuItem) Expire() *time.Time

func (*LfuItem) IsExpired

func (it *LfuItem) IsExpired(now *time.Time) bool

returns boolean value whether this item is expired or not.

type LruItem

type LruItem struct {
	Key        interface{}
	Value      interface{}
	Expiration *time.Time
}

func (*LruItem) Expire

func (it *LruItem) Expire() *time.Time

func (*LruItem) IsExpired

func (it *LruItem) IsExpired(now *time.Time) bool

returns boolean value whether this item is expired or not.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL