cache

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRedisCache

func NewRedisCache(read, write *redis.Pool) interfaces.Cache

NewRedisCache constructor

Types

type RedisCache

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

RedisCache redis

func (*RedisCache) Delete

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

Delete method

func (RedisCache) Exists

func (r RedisCache) Exists(ctx context.Context, key string) (bool, 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) ([]string, 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