cache

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2020 License: BSD-3-Clause Imports: 6 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 {
	Add(key, value string)
	Get(key string) (value string, ok bool)
	Remove(key string)
}

func New

func New(size int, dir string) Cache

type Cache2 added in v1.0.1

type Cache2 interface {
	Add(key string, value interface{}) error
	Get(key string, out interface{}) (ok bool, err error)
	Remove(key string)
}

func New2 added in v1.0.1

func New2(size int, dir string) Cache2

type CacheRedis added in v1.0.2

type CacheRedis interface {
	Add(key string, value interface{}) error
	Get(key string, out interface{}) (ok bool, err error)
	Remove(key string)
}

func NewRedis added in v1.0.2

func NewRedis(size int, conf RedisConfig) CacheRedis

type RedisConfig added in v1.0.2

type RedisConfig struct {
	Addr     string
	Network  string
	Password string
	Database int
}

Jump to

Keyboard shortcuts

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