cache

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(key string) error

func Get

func Get(key string) ([]byte, error)

func InitCache

func InitCache(c ICache)

func InitCacheE

func InitCacheE(c ICacheE)

func InitCacheM

func InitCacheM(c ICacheM)

func MDelete

func MDelete(keys ...string) error

func MGet

func MGet(keys ...string) ([][]byte, error)

func MSet

func MSet(values map[string][]byte) error

func MSetE

func MSetE(values map[string][]byte, exp time.Duration) error

func Set

func Set(key string, value []byte) error

func SetE

func SetE(key string, value []byte, exp time.Duration) error

Types

type ICache

type ICache interface {
	Get(key string) ([]byte, error)
	Set(key string, value []byte) error
	Delete(key string) error
}

type ICacheE

type ICacheE interface {
	ICache
	SetE(key string, value []byte, exp time.Duration) error
}

type ICacheM

type ICacheM interface {
	ICacheE
	MSet(values map[string][]byte) error
	MSetE(values map[string][]byte, exp time.Duration) error
	MGet(keys ...string) ([][]byte, error)
	MDelete(keys ...string) error
}

Jump to

Keyboard shortcuts

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