redis

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheHandler added in v1.3.1

func CacheHandler[R any](prefix string, key string, second int, handler func() R) R

CacheHandler 缓存处理函数

func Init

func Init()

Types

type Client

type Client struct {
	Prefix string
}

func (*Client) Delete

func (p *Client) Delete(key string) (bool, error)

func (*Client) Exists

func (p *Client) Exists(key string) bool

func (*Client) Get

func (p *Client) Get(key string) ([]byte, error)

func (*Client) GetObject

func (p *Client) GetObject(key string, obj any) error

func (*Client) GetString

func (p *Client) GetString(key string) (string, error)

func (*Client) Set

func (p *Client) Set(key string, value interface{}, second int) error

Jump to

Keyboard shortcuts

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