cache

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Load() (interface{}, error)
	Close()
}

**** Cache

type Load

type Load func() (interface{}, error)

type PassiveCache

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

**** PassiveCache

func (*PassiveCache) Delete

func (c *PassiveCache) Delete(name string) error

func (*PassiveCache) Get

func (c *PassiveCache) Get(name string) (interface{}, error)

func (*PassiveCache) GetAndStore

func (c *PassiveCache) GetAndStore(name string, duration time.Duration, handle Load) (interface{}, error)

func (*PassiveCache) Init

func (c *PassiveCache) Init()

func (*PassiveCache) Run

func (c *PassiveCache) Run()

func (*PassiveCache) Stop

func (c *PassiveCache) Stop()

type ProactiveCache

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

**** ProactiveCache

func (*ProactiveCache) Add

func (c *ProactiveCache) Add(name string, duration time.Duration, handle Cache) error

func (*ProactiveCache) Get

func (c *ProactiveCache) Get(name string) (interface{}, error)

func (*ProactiveCache) Init

func (c *ProactiveCache) Init()

func (*ProactiveCache) Remove

func (c *ProactiveCache) Remove(name string) error

func (*ProactiveCache) Run

func (c *ProactiveCache) Run()

func (*ProactiveCache) Stop

func (c *ProactiveCache) Stop()

Jump to

Keyboard shortcuts

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