rediscache

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: Apache-2.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 RedisCache

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

func NewCache

func NewCache(redis redis.Redis) *RedisCache

func NewTTLCache

func NewTTLCache(redis redis.Redis, ttl time.Duration) *RedisCache

func (*RedisCache) Delete

func (c *RedisCache) Delete(k string) error

func (*RedisCache) Get

func (c *RedisCache) Get(k string) (interface{}, error)

func (*RedisCache) GetAll added in v0.11.0

func (c *RedisCache) GetAll() (map[string]interface{}, error)

func (*RedisCache) Put

func (c *RedisCache) Put(k string, v interface{}) error

type RedisHashCache added in v0.11.0

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

func NewHashCache added in v0.11.0

func NewHashCache(redis redis.Redis, key string) *RedisHashCache

func NewTTLHashCache added in v0.11.0

func NewTTLHashCache(redis redis.Redis, ttl time.Duration, key string) *RedisHashCache

func (*RedisHashCache) Delete added in v0.11.0

func (r *RedisHashCache) Delete(k string) error

func (*RedisHashCache) Get added in v0.11.0

func (r *RedisHashCache) Get(k string) (interface{}, error)

func (*RedisHashCache) GetAll added in v0.11.0

func (r *RedisHashCache) GetAll() (map[string]interface{}, error)

func (*RedisHashCache) Put added in v0.11.0

func (r *RedisHashCache) Put(k string, v interface{}) error

Jump to

Keyboard shortcuts

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