redis_cache

package
v0.0.0-...-8122643 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const RedisCacheConfigPath = "redis_cache"

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisCache

type RedisCache struct {
	pubsub_redis.RedisClient
}

func NewCache

func NewCache() *RedisCache

func (*RedisCache) Clear

func (r *RedisCache) Clear() error

func (*RedisCache) Get

func (r *RedisCache) Get(key string, value *string) (bool, error)

func (*RedisCache) GetUnset

func (r *RedisCache) GetUnset(key string, value *string) (bool, error)

func (*RedisCache) Keys

func (r *RedisCache) Keys() ([]string, error)

func (*RedisCache) Set

func (r *RedisCache) Set(key string, value string, ttlSeconds ...int) error

func (*RedisCache) Start

func (r *RedisCache) Start()

func (*RedisCache) Stop

func (r *RedisCache) Stop()

func (*RedisCache) Touch

func (r *RedisCache) Touch(key string) error

func (*RedisCache) Unset

func (r *RedisCache) Unset(key string) error

type RedisLock

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

func (*RedisLock) NotObtained

func (r *RedisLock) NotObtained() bool

func (*RedisLock) Release

func (r *RedisLock) Release() error

type RedisLocker

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

func NewLocker

func NewLocker(redisCache *RedisCache) *RedisLocker

func (*RedisLocker) Lock

func (r *RedisLocker) Lock(key string, ttl time.Duration) (cache.Lock, error)

Jump to

Keyboard shortcuts

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