redis

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisHotCache

type RedisHotCache[T any] struct {
	Redis  *redis.Client
	Prefix string
}

func (RedisHotCache[T]) Delete

func (r RedisHotCache[T]) Delete(ctx context.Context, key string) error

func (RedisHotCache[T]) Exists

func (r RedisHotCache[T]) Exists(ctx context.Context, key string) (bool, error)

func (RedisHotCache[T]) Expiry

func (r RedisHotCache[T]) Expiry(ctx context.Context, key string) (time.Duration, error)

func (RedisHotCache[T]) Get

func (r RedisHotCache[T]) Get(ctx context.Context, key string) (*T, error)

func (RedisHotCache[T]) Increment

func (r RedisHotCache[T]) Increment(ctx context.Context, key string, value int64) error

func (RedisHotCache[T]) IncrementOne

func (r RedisHotCache[T]) IncrementOne(ctx context.Context, key string) error

func (RedisHotCache[T]) Set

func (r RedisHotCache[T]) Set(ctx context.Context, key string, value *T, expiry time.Duration) error

Jump to

Keyboard shortcuts

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