redishotcache

package
v0.0.0-...-b33156b Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RuedisHotCache

type RuedisHotCache[T any] struct {
	Redis    rueidis.Client
	Prefix   string
	For      string
	Disabled bool
}

func (RuedisHotCache[T]) Delete

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

func (RuedisHotCache[T]) Exists

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

func (RuedisHotCache[T]) Expiry

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

func (RuedisHotCache[T]) Get

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

func (RuedisHotCache[T]) Increment

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

func (RuedisHotCache[T]) IncrementOne

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

func (RuedisHotCache[T]) Set

func (r RuedisHotCache[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