local

package
v1.4.9 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Destroy

func Destroy(cache *Cache)

Types

type Cache

type Cache struct {
	*sync.RWMutex
	// contains filtered or unexported fields
}

func New

func New(namespace string) *Cache

func (*Cache) Clear

func (cache *Cache) Clear() error

func (*Cache) Delete

func (cache *Cache) Delete(key string) error

func (*Cache) Expire added in v1.4.9

func (cache *Cache) Expire(key string, expireSec int64) error

func (*Cache) Get

func (cache *Cache) Get(key string) (string, error)

func (*Cache) GetAll

func (cache *Cache) GetAll() (map[string]string, error)

func (*Cache) GetMulti

func (cache *Cache) GetMulti(keys []string) (map[string]string, error)

func (*Cache) Set

func (cache *Cache) Set(key string, value string, expireSec int64) error

func (*Cache) TTL added in v1.4.9

func (cache *Cache) TTL(key string) (int64, error)

Jump to

Keyboard shortcuts

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