cacher

package
v0.0.0-...-2e3489d Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2020 License: Unlicense Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BigCache

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

func (*BigCache) Get

func (c *BigCache) Get(key interface{}) (interface{}, bool)

func (*BigCache) HitRatio

func (c *BigCache) HitRatio() float64

func (*BigCache) Init

func (c *BigCache) Init(cacheSize int, itemSize int)

func (*BigCache) Set

func (c *BigCache) Set(key interface{}, value interface{})

type CCache

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

func (*CCache) Get

func (c *CCache) Get(key interface{}) (interface{}, bool)

func (*CCache) HitRatio

func (c *CCache) HitRatio() float64

func (*CCache) Init

func (c *CCache) Init(cacheSize int, itemSize int)

func (*CCache) Set

func (c *CCache) Set(key interface{}, value interface{})

type Cacher

type Cacher interface {
	Init(cacheSize int, itemSize int)
	Get(key interface{}) (interface{}, bool)
	Set(key interface{}, value interface{})
	HitRatio() float64
}

type FastCache

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

func (*FastCache) Get

func (c *FastCache) Get(key interface{}) (interface{}, bool)

func (*FastCache) HitRatio

func (c *FastCache) HitRatio() float64

func (*FastCache) Init

func (c *FastCache) Init(cacheSize int, itemSize int)

func (*FastCache) Set

func (c *FastCache) Set(key interface{}, value interface{})

type FreeCache

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

func (*FreeCache) Get

func (c *FreeCache) Get(key interface{}) (interface{}, bool)

func (*FreeCache) HitRatio

func (c *FreeCache) HitRatio() float64

func (*FreeCache) Init

func (c *FreeCache) Init(cacheSize int, itemSize int)

func (*FreeCache) Set

func (c *FreeCache) Set(key interface{}, value interface{})

type GoBurrow

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

func (*GoBurrow) Get

func (c *GoBurrow) Get(key interface{}) (interface{}, bool)

func (*GoBurrow) HitRatio

func (c *GoBurrow) HitRatio() float64

func (*GoBurrow) Init

func (c *GoBurrow) Init(cacheSize int, itemSize int)

func (*GoBurrow) Set

func (c *GoBurrow) Set(key interface{}, value interface{})

type Optimal

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

func (*Optimal) Get

func (c *Optimal) Get(key interface{}) (interface{}, bool)

func (*Optimal) HitRatio

func (c *Optimal) HitRatio() float64

func (*Optimal) Init

func (c *Optimal) Init(cacheSize int, itemSize int)

func (*Optimal) Set

func (c *Optimal) Set(key interface{}, value interface{})

type Ristretto

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

func (*Ristretto) Get

func (c *Ristretto) Get(key interface{}) (interface{}, bool)

func (*Ristretto) HitRatio

func (c *Ristretto) HitRatio() float64

func (*Ristretto) Init

func (c *Ristretto) Init(cacheSize int, itemSize int)

func (*Ristretto) Set

func (c *Ristretto) Set(key interface{}, value interface{})

Jump to

Keyboard shortcuts

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