cache

package
v1.7.8 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisCache

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

RedisCache redis implement interfaces.Cache

func NewRedisCache

func NewRedisCache(read, write *redis.Pool) *RedisCache

NewRedisCache constructor

func (*RedisCache) Delete

func (r *RedisCache) Delete(ctx context.Context, key string) (err error)

Delete method

func (RedisCache) Exists

func (r RedisCache) Exists(ctx context.Context, key string) (exist bool, err error)

Exists method

func (*RedisCache) Get

func (r *RedisCache) Get(ctx context.Context, key string) (data []byte, err error)

Get method

func (*RedisCache) GetKeys

func (r *RedisCache) GetKeys(ctx context.Context, pattern string) (data []string, err error)

GetKeys method

func (*RedisCache) Set

func (r *RedisCache) Set(ctx context.Context, key string, value interface{}, expire time.Duration) (err error)

Set method

Jump to

Keyboard shortcuts

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