redis

package
v0.0.0-...-7567983 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

func NewCache

func NewCache(client redis.Cmdable) *Cache

func (*Cache) DecrBy

func (c *Cache) DecrBy(ctx context.Context, key string, value int64) (int64, error)

func (*Cache) Delete

func (c *Cache) Delete(ctx context.Context, key ...string) (int64, error)

func (*Cache) Get

func (c *Cache) Get(ctx context.Context, key string) (val ecache.Value)

func (*Cache) GetSet

func (c *Cache) GetSet(ctx context.Context, key string, val string) (result ecache.Value)

func (*Cache) IncrBy

func (c *Cache) IncrBy(ctx context.Context, key string, value int64) (int64, error)

func (*Cache) IncrByFloat

func (c *Cache) IncrByFloat(ctx context.Context, key string, value float64) (float64, error)

func (*Cache) LPop

func (c *Cache) LPop(ctx context.Context, key string) (result ecache.Value)

func (*Cache) LPush

func (c *Cache) LPush(ctx context.Context, key string, val ...any) (int64, error)

func (*Cache) SAdd

func (c *Cache) SAdd(ctx context.Context, key string, members ...any) (int64, error)

func (*Cache) SRem

func (c *Cache) SRem(ctx context.Context, key string, members ...any) (int64, error)

func (*Cache) Set

func (c *Cache) Set(ctx context.Context, key string, val any, expiration time.Duration) error

func (*Cache) SetNX

func (c *Cache) SetNX(ctx context.Context, key string, val any, expiration time.Duration) (bool, error)

Jump to

Keyboard shortcuts

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