memory

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: MIT Imports: 4 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) 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