memory

package
v0.0.0-...-5745f2c Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCache

func NewCache() factory.Cache

func WithMemoryOption

func WithMemoryOption(op Option) factory.CacheOption

Types

type CaChe

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

func (*CaChe) ClearAll

func (c *CaChe) ClearAll() error

func (*CaChe) Close

func (c *CaChe) Close() error

func (*CaChe) Decr

func (c *CaChe) Decr(key string) error

func (*CaChe) Delete

func (c *CaChe) Delete(key string) error

func (*CaChe) Get

func (c *CaChe) Get(key string) ([]byte, error)

func (*CaChe) Incr

func (c *CaChe) Incr(key string) error

func (*CaChe) IsExist

func (c *CaChe) IsExist(key string) bool

func (*CaChe) Put

func (c *CaChe) Put(key string, val interface{}, timeout time.Duration) error

func (*CaChe) StartAndConfigure

func (c *CaChe) StartAndConfigure(ops ...factory.CacheOption) error

type Option

type Option struct {
	DefaultExpiration time.Duration `mapstructure:"defaultExpiration"`
	CleanupInterval   time.Duration `mapstructure:"cleanupInterval"`
}

Jump to

Keyboard shortcuts

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