memory

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Memory

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

func NewMemory

func NewMemory() (*Memory, func(), error)

NewMemory memory模式

func (*Memory) Connect

func (s *Memory) Connect() error

func (*Memory) Del

func (s *Memory) Del(key string) error

func (*Memory) DisConnect

func (s *Memory) DisConnect() error

func (*Memory) Exists

func (s *Memory) Exists(key string) bool

func (*Memory) Expire

func (s *Memory) Expire(key string, dur time.Duration) error

func (*Memory) Get

func (s *Memory) Get(key string) (string, error)

func (*Memory) GetDel added in v0.0.16

func (s *Memory) GetDel(key string) (string, error)

GetDel 原子读取并删除缓存值。

func (*Memory) HDel

func (s *Memory) HDel(key, field string) error

func (*Memory) HExists

func (s *Memory) HExists(key, field string) error

func (*Memory) HGet

func (s *Memory) HGet(key, field string) (string, error)

func (*Memory) HGetAll

func (s *Memory) HGetAll(key string) (map[string]string, error)

func (*Memory) HSet

func (s *Memory) HSet(key, field, value string) error

func (*Memory) Incr added in v0.0.19

func (s *Memory) Incr(key string) (int64, error)

Incr 原子递增内存缓存中的数值键。

func (*Memory) List added in v0.0.20

func (s *Memory) List() ([]store.Entry, error)

List 返回内存缓存中的字符串和 Hash 条目及其元数据。

func (*Memory) Set

func (s *Memory) Set(key, value string, expire time.Duration) error

Jump to

Keyboard shortcuts

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