cache

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Get(key string) (string, error)
	Exists(key ...string) (int, error)
	Del(key string) error
	Set(key string, value string, expiration time.Duration) error
	GetDel(key string) (string, error)
	SAdd(set string, elem string) error
	SIsmember(set string, elem string) (bool, error)
}

type InternalError

type InternalError struct{}

func (*InternalError) Error

func (e *InternalError) Error() string

type KeyError

type KeyError struct{}

func (*KeyError) Error

func (e *KeyError) Error() string

type RedisCache

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

func NewRedis

func NewRedis(host string, port int, user string, secret string, db int) *RedisCache

func (*RedisCache) Del

func (r *RedisCache) Del(key string) error

func (*RedisCache) Exists

func (r *RedisCache) Exists(keys ...string) (int, error)

func (*RedisCache) Get

func (r *RedisCache) Get(key string) (string, error)

func (*RedisCache) GetDel

func (r *RedisCache) GetDel(key string) (string, error)

func (*RedisCache) SAdd

func (r *RedisCache) SAdd(set string, elem string) error

func (*RedisCache) SIsmember

func (r *RedisCache) SIsmember(set string, elem string) (bool, error)

func (*RedisCache) Set

func (r *RedisCache) Set(key string, value string, expiration time.Duration) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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