cache

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2020 License: GPL-3.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 ExplorerCache

type ExplorerCache struct {
	// contains filtered or unexported fields
}

func NewCache

func NewCache() *ExplorerCache

cache constructor

func (*ExplorerCache) ExpirationCheck

func (c *ExplorerCache) ExpirationCheck()

loop for checking items expiration

func (*ExplorerCache) Get

func (c *ExplorerCache) Get(key interface{}, callback func() interface{}, ttl time.Duration) interface{}

get or store value from cache

func (*ExplorerCache) Store

func (c *ExplorerCache) Store(key interface{}, value interface{}, ttl time.Duration) interface{}

save value to cache

type Item

type Item struct {
	// contains filtered or unexported fields
}

func (*Item) IsExpired

func (c *Item) IsExpired() bool

Jump to

Keyboard shortcuts

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