cache

package
v0.0.0-...-86a22be Latest Latest
Warning

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

Go to latest
Published: May 28, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	RedisHost     string `env:"REDIS_HOST" envDefault:"localhost:6379"`
	RedisPassword string `env:"REDIS_PASSWORD" envDefault:"eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81"`
}

func NewConfig

func NewConfig() *Config

type RedisStore

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

func NewRedisStore

func NewRedisStore() (*RedisStore, error)

func (*RedisStore) Close

func (r *RedisStore) Close()

func (*RedisStore) Delete

func (r *RedisStore) Delete(key string) error

func (*RedisStore) DeleteAll

func (r *RedisStore) DeleteAll() error

func (*RedisStore) Get

func (r *RedisStore) Get(key string) interface{}

func (*RedisStore) GetCacheResponse

func (r *RedisStore) GetCacheResponse(key string) []byte

func (*RedisStore) Set

func (r *RedisStore) Set(key string, value interface{}, ttl time.Duration)

func (*RedisStore) SetCacheResponse

func (r *RedisStore) SetCacheResponse(key string, value []byte, ttl time.Duration)

Jump to

Keyboard shortcuts

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