localcache

package
v0.0.0-...-68b20d9 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Nil                   = errors.New("cache:nil")
	KeyNull               = errors.New("key is null")
	ValueNull             = errors.New("value is null")
	FieldNull             = errors.New("field is null")
	HashSetFieldTypeError = errors.New("hash set field's type is not string")
	FieldValueNumberError = errors.New("hash set field and value number is fault")
)

Functions

func NewRamCacheClient

func NewRamCacheClient() cache.Cache

Types

type RamCacheClient

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

func (*RamCacheClient) Close

func (rcc *RamCacheClient) Close()

func (*RamCacheClient) Del

func (rcc *RamCacheClient) Del(keys ...string) error

func (*RamCacheClient) Get

func (rcc *RamCacheClient) Get(key string) (data string, err error)

func (*RamCacheClient) HDel

func (rcc *RamCacheClient) HDel(key string, fields ...string) error

func (*RamCacheClient) HGet

func (rcc *RamCacheClient) HGet(key, field string) (string, error)

func (*RamCacheClient) HGetAll

func (rcc *RamCacheClient) HGetAll(key string) (map[string]string, error)

func (*RamCacheClient) HSet

func (rcc *RamCacheClient) HSet(key string, values ...interface{}) error

func (*RamCacheClient) Set

func (rcc *RamCacheClient) Set(key string, value interface{}, expiration time.Duration) error

func (*RamCacheClient) SetOneDay

func (rcc *RamCacheClient) SetOneDay(key string, value interface{}) error

Jump to

Keyboard shortcuts

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